|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zk.ui.AbstractComponent
org.zkoss.zul.Script
public class Script
A component to represent script codes running at the client. It is the same as HTML SCRIPT tag.
Note: it is the scripting codes running at the client, not at the
server. Don't confuse it with the zscript element.
To avoid typo, this compnent requires you to specify the type
(setType(java.lang.String)) -- which is, if JavaScript, "text/javascript".
| Field Summary |
|---|
| Fields inherited from interface org.zkoss.zk.ui.Component |
|---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
| Constructor Summary | |
|---|---|
Script()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getCharset()
Returns the character enconding of the source. |
java.lang.String |
getSrc()
Returns the URI of the source that contains the script codes. |
java.lang.String |
getType()
Returns the type of this client script. |
boolean |
insertBefore(org.zkoss.zk.ui.Component child,
org.zkoss.zk.ui.Component insertBefore)
Only Label children are allowed. |
boolean |
isDefer()
Returns whether to defer the execution of the script codes. |
void |
redraw(java.io.Writer out)
|
void |
setCharset(java.lang.String charset)
Sets the character encoding of the source. |
void |
setDefer(boolean defer)
Sets whether to defer the execution of the script codes. |
void |
setSrc(java.lang.String src)
Sets the URI of the source that contains the script codes. |
void |
setType(java.lang.String type)
Sets the type of this client script. |
| Methods inherited from class org.zkoss.zk.ui.AbstractComponent |
|---|
addAnnotation, addAnnotation, addEventHandler, addEventListener, addSharedAnnotationMap, addSharedEventHandlerMap, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getEventHandler, getExtraCtrl, getFellow, getFellowIfAny, getId, getListenerIterator, getMold, getMoldURI, getNamespace, getPage, getParent, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, invalidate, isChildable, isListenerAvailable, isVisible, newExtraCtrl, onChildAdded, onChildRemoved, onDrawNewChild, onWrongValue, removeAttribute, removeAttribute, removeChild, removeEventListener, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setParent, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, toString, unsetVariable |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Script()
| Method Detail |
|---|
public java.lang.String getType()
Default: null. However, it is invalid. In other words, you must specify a correct type. For JavaScript, it is "text/javascript".
public void setType(java.lang.String type)
text/javascript
Note: this property is NOT optional. You must specify one.
public java.lang.String getCharset()
getSrc().
Default: null.
public void setCharset(java.lang.String charset)
setSrc(java.lang.String).
public java.lang.String getSrc()
Default: null.
public void setSrc(java.lang.String src)
You either add the script codes directly with the Label
children, or
set the URI to load the script codes with setSrc(java.lang.String).
But, not both.
src - the URI of the source that contains the script codespublic boolean isDefer()
Default: false.
public void setDefer(boolean defer)
public boolean insertBefore(org.zkoss.zk.ui.Component child,
org.zkoss.zk.ui.Component insertBefore)
Label children are allowed.
insertBefore in interface org.zkoss.zk.ui.ComponentinsertBefore in class org.zkoss.zk.ui.AbstractComponent
public void redraw(java.io.Writer out)
throws java.io.IOException
redraw in interface org.zkoss.zk.ui.Componentredraw in class org.zkoss.zk.ui.AbstractComponentjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||