|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
org.zkoss.jsf.zul.impl.AbstractComponent
org.zkoss.jsf.zul.impl.LeafComponent
public abstract class LeafComponent
The skeletal class used to implement the ZULJSF Component for ZK components that don't accept any child.
| Field Summary | |
|---|---|
protected java.util.Map |
_compAttrMap
|
protected ComposerHandler |
_composer
|
| Fields inherited from class javax.faces.component.UIComponent |
|---|
bindings |
| Constructor Summary | |
|---|---|
LeafComponent()
|
|
| Method Summary | |
|---|---|
protected void |
addZULDynamicAttribute(java.lang.String name,
java.lang.Object value)
set the attribute(name) of this component to value, the difference between this method and setAttributeValue(java.lang.String, java.lang.Object)
is this method directly replace the attribute whether the attribute associate to a ValueBinding. |
protected void |
afterZULComponentComposed(org.zkoss.zk.ui.Component zulcomp)
This method give the delivering class a chance to handle ZUL Component just after it is composed. |
void |
encodeBegin(javax.faces.context.FacesContext context)
Override method, We Construct ZUL JSF Component tree here. |
void |
encodeChildren(javax.faces.context.FacesContext context)
|
void |
encodeEnd(javax.faces.context.FacesContext context)
Override Method, write a special mark denoting the component in this method |
protected void |
evaluateDynaAttributes(org.zkoss.zk.ui.Component target,
java.util.Map zulAttrMap)
Test if the attributes are annotation or component attributes. |
java.lang.Object |
getAttributeValue(java.lang.String att)
Get value of attribute of Component. if value of attribute is a ValueBinding, then Binding result will return. |
protected java.lang.String |
getComponentDefName()
get the component definition name of this component The default implementation change the class name to lower char and return |
protected org.zkoss.jsf.zul.impl.ComponentInfo |
getComponentInfo()
Get ComponentInfo for current Component Tree. |
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. |
boolean |
getRendersChildren()
Override Method, don't render children my self. return false; |
java.lang.String |
getUse()
Returns the class name that is used to implement the ZUL Component associated with this ZULJSF Component. |
protected org.zkoss.zk.ui.Component |
getZULComponent()
Returns the ZUL Component associated with this ZUL JSF Component the associated ZUL Component is only exist after loadZULTree(org.zkoss.zk.ui.Page, java.io.StringWriter) |
protected void |
loadZULTree(org.zkoss.zk.ui.Page page,
java.io.StringWriter writer)
Call by RootComponent or BranchComponent to load zk stuff. |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
Override Method, restore the state of this component. |
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
Override Method, save the state of this component. |
void |
setAttributeValue(java.lang.String att,
java.lang.Object value)
set value to attribute of Component, if a ValueBinding is associated with attribute , then it will set value to Binding Object Note: set attribute after loadZULTree(org.zkoss.zk.ui.Page, java.io.StringWriter) doesn't affect the ZUL Component which is associated to this component. |
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 |
setId(java.lang.String id)
Override Method, remember the id is set. |
void |
setUse(java.lang.String use)
Sets the class name that is used to implement the ZUL Component associated with this ZULJSF Component. |
void |
setZULDynamicAttribute(java.util.Map map)
Set dynamic Attribute of this ZULJSF Component, This method is called by LeafTag only, developer should not call this method directly. |
| Methods inherited from class org.zkoss.jsf.zul.impl.AbstractComponent |
|---|
findAncestorWithClass, getBodyContent, getFacesContext, getFamily, getIf, getUnless, isEffective, isSuppressed, restoreAttachedMapState, saveAttachedMapState, setBodyContent, setIf, setSuppressed, setUnless |
| Methods inherited from class javax.faces.component.UIComponentBase |
|---|
addFacesListener, broadcast, decode, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setParent, setRendered, setRendererType, setTransient, setValueBinding |
| Methods inherited from class javax.faces.component.UIComponent |
|---|
encodeAll, getContainerClientId, getValueExpression, setValueExpression |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map _compAttrMap
protected ComposerHandler _composer
| Constructor Detail |
|---|
public LeafComponent()
| Method Detail |
|---|
protected java.lang.String getComponentDefName()
public void encodeBegin(javax.faces.context.FacesContext context)
throws java.io.IOException
encodeBegin in class javax.faces.component.UIComponentBasejava.io.IOExceptionprotected org.zkoss.jsf.zul.impl.ComponentInfo getComponentInfo()
getComponentInfo in class AbstractComponentpublic boolean getRendersChildren()
getRendersChildren in class javax.faces.component.UIComponentBase
public void encodeChildren(javax.faces.context.FacesContext context)
throws java.io.IOException
encodeChildren in class javax.faces.component.UIComponentBasejava.io.IOException
public void encodeEnd(javax.faces.context.FacesContext context)
throws java.io.IOException
encodeEnd in class javax.faces.component.UIComponentBasejava.io.IOException
protected void loadZULTree(org.zkoss.zk.ui.Page page,
java.io.StringWriter writer)
throws java.io.IOException
loadZULTree in class AbstractComponentjava.io.IOExceptionprotected org.zkoss.zk.ui.Component getZULComponent()
loadZULTree(org.zkoss.zk.ui.Page, java.io.StringWriter)
protected void evaluateDynaAttributes(org.zkoss.zk.ui.Component target,
java.util.Map zulAttrMap)
throws org.zkoss.util.ModificationException,
java.lang.NoSuchMethodException
target - the target component
java.lang.NoSuchMethodException
org.zkoss.util.ModificationExceptionprotected void afterZULComponentComposed(org.zkoss.zk.ui.Component zulcomp)
public java.lang.Object getAttributeValue(java.lang.String att)
att - attribute name
public void setAttributeValue(java.lang.String att,
java.lang.Object value)
loadZULTree(org.zkoss.zk.ui.Page, java.io.StringWriter) doesn't affect the ZUL Component which is associated to this component.
att - attribute namevalue - attribute value;public java.lang.String getUse()
Default: null
public void setUse(java.lang.String use)
use - the class name used to implement the ZUL Component, or null
to use the defaultpublic void setZULDynamicAttribute(java.util.Map map)
map - the dynamic attributes.
protected void addZULDynamicAttribute(java.lang.String name,
java.lang.Object value)
setAttributeValue(java.lang.String, java.lang.Object)
is this method directly replace the attribute whether the attribute associate to a ValueBinding.
Note: set attribute after loadZULTree(org.zkoss.zk.ui.Page, StringWriter) doesn't affect the ZUL Component which is associated to this component.
name - attribute name of componentvalue - value of attributepublic java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState in interface javax.faces.component.StateHoldersaveState in class AbstractComponent
public void restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
restoreState in interface javax.faces.component.StateHolderrestoreState in class AbstractComponentpublic void setId(java.lang.String id)
setId in class javax.faces.component.UIComponentBasepublic 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||