|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.jsp.tagext.SimpleTagSupport
org.zkoss.jsp.zul.impl.AbstractTag
org.zkoss.jsp.zul.InitTag
public class InitTag
A Tag map to the ZK Initiator.
Implemented by an initiator that will be invoked if it is specified
in the init directive.
<z:init class="MyInit" />
Once specified, an instance inside this tag is created and Initiator.doInit(org.zkoss.zk.ui.Page, java.lang.Object[]) is called
before the page is evaluated. Then, Initiator.doAfterCompose(org.zkoss.zk.ui.Page) is called
after all components are created, and before any event is processed.
In additions, Initiator.doFinally() is called
after the page has been evaluated. If an exception occurs, Initiator.doCatch(java.lang.Throwable)
is called.
A typical usage: starting a transaction in doInit, rolling back it
in Initiator.doCatch(java.lang.Throwable) and commit it in Initiator.doFinally()
(if Initiator.doCatch(java.lang.Throwable) is not called).
| Constructor Summary | |
|---|---|
InitTag()
|
|
| Method Summary | |
|---|---|
void |
doTag()
Add this Initiator into HttpRequest, this will be processed by Component container: PageTag. |
java.lang.String |
getUse()
Returns the class that implements Initiator. |
void |
setDynamicAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.Object value)
Called when a tag declared to accept dynamic attributes is passed an attribute that is not declared in the Tag Library Descriptor. |
void |
setUse(java.lang.String clazz)
Sets the class that implements Initiator. |
| Methods inherited from class org.zkoss.jsp.zul.impl.AbstractTag |
|---|
getIf, getUnless, isEffective, setIf, setUnless |
| Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport |
|---|
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InitTag()
| Method Detail |
|---|
public void setDynamicAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.Object value)
throws javax.servlet.jsp.JspException
<z:init use="demo.MyInit" arg0="an arg" arg1="another arg " ...../>
setDynamicAttribute in interface javax.servlet.jsp.tagext.DynamicAttributesuri - the namespace of the attribute. Ignored in this version.localName - the name of the attribute being set.value - the value of the attribute
javax.servlet.jsp.JspException
public void doTag()
throws javax.servlet.jsp.JspException,
java.io.IOException
PageTag.
doTag in interface javax.servlet.jsp.tagext.SimpleTagdoTag in class javax.servlet.jsp.tagext.SimpleTagSupportjavax.servlet.jsp.JspException
java.io.IOExceptionpublic void setUse(java.lang.String clazz)
Initiator.
clazz - a class name with derived class which is implements Initiator
java.lang.IllegalArgumentException - if input class can't be found or is not implement Initiatorpublic java.lang.String getUse()
Initiator.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||