|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ClientPage
This is the main interface that every compiled JClientPage implements
| Method Summary | |
|---|---|
void |
alert(java.lang.String alertString)
displays an alert with the given string in the current window (blocking) |
java.lang.Object |
call(java.lang.String functionName,
java.lang.Object[] args)
invokes a JavaScript function in the current window |
java.lang.Boolean |
confirm(java.lang.String confirmString)
displays a confirm dialog box (blocking) |
ClientPageNode |
createElement(java.lang.String tagName)
creates a new DOM element |
ClientPageNode |
createTextNode(java.lang.String text)
creates a new DOM text element |
java.lang.Object |
eval(java.lang.String iString)
evaluates a JavaScript expression in the current window |
java.lang.Object |
executeInternal(java.lang.String methodName,
java.lang.Object[] args)
this method is used by the JCP implementation to reflectively invoke a method of the page |
ClientPageNode |
getElementById(java.lang.String id)
searches for a node given its HTML id |
ClientPageNode[] |
getElementsByExpression(java.lang.String exp)
searches for nodes evaluating a JavaScript expression (that returns an array of nodes). |
ClientPageNode[] |
getElementsByName(java.lang.String name)
searches for nodes given an HTML name IMPORTANT - due to a IE7 bug (and our workaround...) in some cases this method is a bit slow... |
ClientPageNode[] |
getElementsByTagName(java.lang.String name)
searches for nodes given an HTML tag name |
java.util.List<MethodDescriptor> |
getMethods()
returns a list of descriptors representing all the methods declared in the page (for internal use) |
netscape.javascript.JSObject |
getWindow()
returns the JSObject representing the current window |
void |
init()
is invoked by the JCP engine when the page is compiled and instantiated |
void |
onLoad()
is invoked by the JCP engine when the page is loaded, immediately after the init() method. |
void |
setWindow(netscape.javascript.JSObject window)
|
| Method Detail |
|---|
void onLoad()
void init()
netscape.javascript.JSObject getWindow()
void setWindow(netscape.javascript.JSObject window)
ClientPageNode getElementById(java.lang.String id)
id - the HTML id of the node
ClientPageNode[] getElementsByName(java.lang.String name)
name - the name of the nodes
ClientPageNode[] getElementsByTagName(java.lang.String name)
name - the tag name of the nodes
ClientPageNode[] getElementsByExpression(java.lang.String exp)
exp - the expression to be evaluated
ClientPageNode createElement(java.lang.String tagName)
tagName - the tag name
ClientPageNode createTextNode(java.lang.String text)
text - the content of the text element
java.lang.Object call(java.lang.String functionName,
java.lang.Object[] args)
functionName - the function nameargs - the function arguments
java.lang.Object eval(java.lang.String iString)
iString - the expression to be evaluated
void alert(java.lang.String alertString)
alertString - java.lang.Boolean confirm(java.lang.String confirmString)
confirmString - the text displayed in the dialog
java.lang.Object executeInternal(java.lang.String methodName,
java.lang.Object[] args)
methodName - the method nameargs - the method arguments
java.util.List<MethodDescriptor> getMethods()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||