|
||||||||||
| 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.impl.LeafTag
public abstract class LeafTag
The skeletal class used to implement the JSP tag for ZK components that don't accept any child.
Remember to declare the following in the TLD file: <body-content>empty</body-content>
| Field Summary | |
|---|---|
protected java.util.Map |
_attrMap
|
protected org.zkoss.zk.ui.Component |
_comp
|
protected java.util.Map |
_eventListenerMap
|
protected java.lang.String |
_forward
|
protected ComponentTag |
_parenttag
|
protected RootTag |
_roottag
|
protected java.lang.String |
_use
|
protected ComposerHandler |
composeHandle
|
| Constructor Summary | |
|---|---|
LeafTag()
|
|
| Method Summary | |
|---|---|
void |
doTag()
To process the leaf tag. |
void |
evaluateDynaAttributes(org.zkoss.zk.ui.Component target,
java.util.Map attrs)
Test if the attributes are annotation or component attributes. |
org.zkoss.zk.ui.Component |
getComponent()
Returns the component associated with this tag. |
org.zkoss.zk.ui.Component[] |
getComponents()
a dummy method of getComponent() |
java.lang.String |
getForward()
Returns the forward condition that controls how to forward an event, that is received by the component created by this info, to another component. |
protected abstract java.lang.String |
getJspTagName()
The name of Jsp Tag. |
ComponentTag |
getParentTag()
Returns the parent tag. |
RootTag |
getRootTag()
Returns the page tag that this tag belongs to. |
java.lang.String |
getUse()
Returns the class name that is used to implement the component associated with this tag. |
boolean |
isInline()
default Tag's Component is not an inline macro. |
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 |
setForward(java.lang.String forward)
Sets the forward condition that controls when to forward an event receiving by this component to another component. |
void |
setParent(javax.servlet.jsp.tagext.JspTag parent)
Sets the parent tag. |
void |
setUse(java.lang.String use)
Sets the class name that is used to implement the component associated with this tag. |
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.zkoss.jsp.zul.impl.ComponentTag |
|---|
addChildTag |
| Field Detail |
|---|
protected org.zkoss.zk.ui.Component _comp
protected RootTag _roottag
protected ComponentTag _parenttag
protected java.util.Map _attrMap
protected java.util.Map _eventListenerMap
protected java.lang.String _use
protected java.lang.String _forward
protected ComposerHandler composeHandle
| Constructor Detail |
|---|
public LeafTag()
| Method Detail |
|---|
public RootTag getRootTag()
getRootTag in interface ComponentTagpublic ComponentTag getParentTag()
getParentTag in interface ComponentTagpublic org.zkoss.zk.ui.Component getComponent()
getComponent in interface ComponentTagprotected abstract java.lang.String getJspTagName()
public void setParent(javax.servlet.jsp.tagext.JspTag parent)
setParent in interface javax.servlet.jsp.tagext.SimpleTagsetParent in class javax.servlet.jsp.tagext.SimpleTagSupport
public void doTag()
throws javax.servlet.jsp.JspException,
java.io.IOException
doTag in interface javax.servlet.jsp.tagext.SimpleTagdoTag in class javax.servlet.jsp.tagext.SimpleTagSupportjavax.servlet.jsp.JspException
java.io.IOException
public void evaluateDynaAttributes(org.zkoss.zk.ui.Component target,
java.util.Map attrs)
throws org.zkoss.util.ModificationException,
java.lang.NoSuchMethodException
target - the target componentattrs -
org.zkoss.util.ModificationException
java.lang.NoSuchMethodException
public void setDynamicAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.Object value)
throws javax.servlet.jsp.JspException
setDynamicAttribute in interface javax.servlet.jsp.tagext.DynamicAttributesuri - the namespace of the attribute, always null currently.localName - the name of the attribute being set.value - the value of the attribute
javax.servlet.jsp.JspExceptionpublic java.lang.String getUse()
Default: null
public void setUse(java.lang.String use)
use - the class name used to implement the component, or null
to use the defaultpublic java.lang.String getForward()
Default: null.
If not null, when the component created by this info receives the event specified in the forward condition, it will forward it to the target component, which is also specified in the forward condition.
setForward(java.lang.String)public void setForward(java.lang.String forward)
The basic format:
onEvent1=id1/id2.onEvent2
It means when onEvent1 is received, onEvent2 will be posted to the component with the specified path (id1/id2).
If onEvent1 is omitted, it is assumed to be onClick (and
the equal sign need not to be specified.
If the path is omitted, it is assumed to be the space owner
Component.getSpaceOwner().
For example, "onOK" means "onClick=onOK".
You can specify several forward conditions by separating them with comma as follows:
onChanging=onChanging,onChange=onUpdate,onOK
forward - the forward condition. There are several forms:
"onEvent1", "target.onEvent1" and "onEvent1(target.onEvent2)",
where target could be "id", "id1/id2" or "${elExpr}".
The EL expression must return either a path or a reference to
a component.public boolean isInline()
isInline in interface ComponentTagpublic org.zkoss.zk.ui.Component[] getComponents()
getComponent()
getComponents in interface ComponentTag
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||