| org.zkoss.jsf.zul.impl.AbstractComponent org.zkoss.jsf.zul.impl.LeafComponent
All known Subclasses: org.zkoss.jsf.zul.impl.BranchComponent,
LeafComponent | abstract public class LeafComponent extends AbstractComponent (Code) | | The skeletal class used to implement the ZULJSF Component for ZK components
that don't accept any child.
author: Dennis.Chen |
Method Summary | |
protected void | addZULDynamicAttribute(String name, Object value) set the attribute(name) of this component to value, the difference between this method and
LeafComponent.setAttributeValue is this method directly replace the attribute whether the attribute associate to a ValueBinding. | void | afterComposeComponent() after children creation do dynamic attributes setter work and registers event handler. | protected void | afterZULComponentComposed(Component zulcomp) This method give the delivering class a chance to handle ZUL Component just after it is composed.
This method will be invoked after ZUL component is composed and listener, attribute of ZUL component is setted. | public void | encodeBegin(FacesContext context) Override method,
We Construct ZUL JSF Component tree here. | public void | encodeChildren(FacesContext context) | public void | encodeEnd(FacesContext context) | protected void | evaluateDynaAttributes(Component target, Map zulAttrMap) Test if the attributes are annotation or component attributes.
If is Component attributes then invokes setter methods to update all assigned attributes. | public Object | getAttributeValue(String att) Get value of attribute of Component. | protected String | getComponentDefName() | protected ComponentInfo | getComponentInfo() | public 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. | BranchComponent | getParentComponent() | public boolean | getRendersChildren() Override Method, don't render children my self. | RootComponent | getRootComponent() Returns the RootComponent that this Component belongs to. | UIForm | getUIForm() get parent UI Form of this component. | public String | getUse() Returns the class name that is used to implement the ZUL Component
associated with this ZULJSF Component. | protected Component | getZULComponent() | void | initComponent(org.zkoss.zk.ui.Page page) Create ZUL Component, and then associate it to it's Parent Component or Page Component
Called by
LeafComponent.loadZULTree . | protected void | loadZULTree(org.zkoss.zk.ui.Page page, StringWriter writer) Call by RootComponent or BranchComponent to load zk stuff. | public void | restoreState(FacesContext context, Object state) Override Method, restore the state of this component. | public Object | saveState(FacesContext context) Override Method, save the state of this component. | public void | setAttributeValue(String att, 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
LeafComponent.loadZULTree doesn't affect the ZUL Component which is associated to this component. | public void | setForward(String forward) Sets the forward condition that controls when to forward
an event receiving by this component to another component.
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
Parameters: forward - the forward condition.
| public void | setId(String id) Override Method, remember the id is set. | public void | setUse(String use) Sets the class name that is used to implement the ZUL Component
associated with this ZULJSF Component. | void | setZULCustomAttribute(Map map) | public void | setZULDynamicAttribute(Map map) Set dynamic Attribute of this ZULJSF Component,
This method is called by LeafTag only, developer should not call this method directly. | void | writeComponentMark(Writer writer) Writes a special mark to the output to denote the location
of this component. |
fakeOw | ResponseWriter fakeOw(Code) | | |
addZULDynamicAttribute | protected void addZULDynamicAttribute(String name, Object value)(Code) | | set the attribute(name) of this component to value, the difference between this method and
LeafComponent.setAttributeValue is this method directly replace the attribute whether the attribute associate to a ValueBinding.
Note: set attribute after
LeafComponent.loadZULTree(org.zkoss.zk.ui.Page,StringWriter) doesn't affect the ZUL Component which is associated to this component.
Parameters: name - attribute name of component Parameters: value - value of attribute |
afterComposeComponent | void afterComposeComponent()(Code) | | after children creation do dynamic attributes setter work and registers event handler.
Called by
LeafComponent.loadZULTree .
|
afterZULComponentComposed | protected void afterZULComponentComposed(Component zulcomp)(Code) | | This method give the delivering class a chance to handle ZUL Component just after it is composed.
This method will be invoked after ZUL component is composed and listener, attribute of ZUL component is setted.
Note: Default implementation do nothing.
|
encodeBegin | public void encodeBegin(FacesContext context) throws IOException(Code) | | Override method,
We Construct ZUL JSF Component tree here.
This method is called by JSF implementation, deriving class rarely need to invoke this method.
|
encodeChildren | public void encodeChildren(FacesContext context) throws IOException(Code) | | |
encodeEnd | public void encodeEnd(FacesContext context) throws IOException(Code) | | Override Method, write a special mark denoting the component in this method
|
getAttributeValue | public Object getAttributeValue(String att)(Code) | | Get value of attribute of Component. if value of attribute is a ValueBinding, then Binding result will return.
Parameters: att - attribute name value of attribute |
getComponentDefName | protected String getComponentDefName()(Code) | | get the component definition name of this component
The default implementation change the class name to lower char and return
a ZUL component name |
getComponentInfo | protected ComponentInfo getComponentInfo()(Code) | | Get ComponentInfo for current Component Tree.
it always return RootComponent's getComponentInfo(), if RootComponent doesn't exist return null;
|
getForward | public String getForward()(Code) | | Returns the forward condition that controls how to forward
an event, that is received by the component created
by this info, to another component.
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.
See Also: LeafComponent.setForward |
getRendersChildren | public boolean getRendersChildren()(Code) | | Override Method, don't render children my self. return false;
|
getRootComponent | RootComponent getRootComponent()(Code) | | Returns the RootComponent that this Component belongs to.
|
getUIForm | UIForm getUIForm()(Code) | | get parent UI Form of this component.
the parent component which type is UIForm. |
getUse | public String getUse()(Code) | | Returns the class name that is used to implement the ZUL Component
associated with this ZULJSF Component.
Default: null
the class name used to implement the ZUL Component, or nullto use the default |
restoreState | public void restoreState(FacesContext context, Object state)(Code) | | Override Method, restore the state of this component.
|
saveState | public Object saveState(FacesContext context)(Code) | | Override Method, save the state of this component.
|
setAttributeValue | public void setAttributeValue(String att, Object value)(Code) | | 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
LeafComponent.loadZULTree doesn't affect the ZUL Component which is associated to this component.
Parameters: att - attribute name Parameters: value - attribute value; |
setForward | public void setForward(String forward)(Code) | | Sets the forward condition that controls when to forward
an event receiving by this component to another component.
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
Parameters: 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 toa component.
|
setId | public void setId(String id)(Code) | | Override Method, remember the id is set.
|
setUse | public void setUse(String use)(Code) | | Sets the class name that is used to implement the ZUL Component
associated with this ZULJSF Component.
Parameters: use - the class name used to implement the ZUL Component, or nullto use the default |
setZULCustomAttribute | void setZULCustomAttribute(Map map)(Code) | | set custom attributes of this ZULJSF Component,
This method is called by BaseCustomeAttribute only,
Parameters: map - |
setZULDynamicAttribute | public void setZULDynamicAttribute(Map map)(Code) | | Set dynamic Attribute of this ZULJSF Component,
This method is called by LeafTag only, developer should not call this method directly.
Parameters: map - the dynamic attributes. |
writeComponentMark | void writeComponentMark(Writer writer) throws IOException(Code) | | Writes a special mark to the output to denote the location
of this component.
|
|
|