| org.zkoss.jsf.zul.impl.AbstractComponent
All known Subclasses: org.zkoss.jsf.zul.impl.Inline, org.zkoss.jsf.zul.impl.BaseCustomAttributes, org.zkoss.jsf.zul.impl.BaseZScript, org.zkoss.jsf.zul.impl.BaseAttribute, org.zkoss.jsf.zul.impl.RootComponent, org.zkoss.jsf.zul.impl.BaseInit, org.zkoss.jsf.zul.impl.BaseComponentDefinition, org.zkoss.jsf.zul.impl.LeafComponent,
AbstractComponent | public class AbstractComponent extends UIComponentBase (Code) | | The skeletal class for implementing the generic ZULJSF Component.
This component handle _if, _unless attributes of ZUL Component.
This component also handle bodyContent which is set by
org.zkoss.jsf.zul.tag.impl.AbstractTag.doAfterBody author: Dennis.Chen |
Method Summary | |
protected UIComponent | findAncestorWithClass(UIComponent component, Class clazz) A convenient method for finding ancestor of special class. | protected String | getBodyContent() get the body content of this ZULJSF Component. | protected ComponentInfo | getComponentInfo() Get ComponentInfo for current Component Tree. In LeafComponent,
it always return RootComponent's getComponentInfo(), if RootComponent doesn't exist return null;
In RootComponet , it check a existed instance and return it, if not, a new instance will be created and return.
Note : return null in default implementation. | public FacesContext | getFacesContext() get current FacesContext for this component, this method is protected in
super class, I public it for convenient usage. | public String | getFamily() get Component Family of ZULJSF Component. | public boolean | getIf() Returns the if condition. | public boolean | getUnless() Returns the unless condition. | public boolean | isEffective() Returns whether this component is effective. | protected boolean | isSuppressed() | protected void | loadZULTree(org.zkoss.zk.ui.Page page, StringWriter writer) Call by RootComponent or BranchComponent to load tree structure of zk zul components. | protected static Map | restoreAttachedMapState(FacesContext context, Object keys, Object values) a convenient to restore the state of a Map. | public void | restoreState(FacesContext context, Object state) Override Method, restore the state of this component. | protected static Object[] | saveAttachedMapState(FacesContext context, Map mapObject) a convenient to save the state of a Map. | public Object | saveState(FacesContext context) Override Method, save the state of this component. | public void | setBodyContent(String content) Set BodyContnet, this method is called by
org.zkoss.jsf.zul.tag.impl.AbstractTag to setup JSP Body
Content, developer rarely call this method. | public void | setIf(boolean ifcond) Sets the if condition. | public void | setSuppressed(boolean suppressed) set suppressed by
org.zkoss.jsf.zul.tag.impl.AbstractTag only, developer should not call this method. | public void | setUnless(boolean unless) Sets the unless condition. |
findAncestorWithClass | protected UIComponent findAncestorWithClass(UIComponent component, Class clazz)(Code) | | A convenient method for finding ancestor of special class.
this method is use to build ZULJSF component tree under JSF component tree.
Parameters: component - a component, usually a AbstractComponent instance Parameters: clazz - a class, usually a AbstractComponent class a ancestor Component |
getBodyContent | protected String getBodyContent()(Code) | | get the body content of this ZULJSF Component.
the body content of JSP |
getComponentInfo | protected ComponentInfo getComponentInfo()(Code) | | Get ComponentInfo for current Component Tree. In LeafComponent,
it always return RootComponent's getComponentInfo(), if RootComponent doesn't exist return null;
In RootComponet , it check a existed instance and return it, if not, a new instance will be created and return.
Note : return null in default implementation.
a ComponentInfo of current Component Tree |
getFacesContext | public FacesContext getFacesContext()(Code) | | get current FacesContext for this component, this method is protected in
super class, I public it for convenient usage.
|
getFamily | public String getFamily()(Code) | | get Component Family of ZULJSF Component.
|
getIf | public boolean getIf()(Code) | | Returns the if condition. If the if condition is false, this component is
ignored. If the unless condition (
AbstractComponent.getUnless ) is true, this
component is ignored, too. Components deriving from this class shall
invoke
AbstractComponent.isEffective to know the result.
Default: true.
|
getUnless | public boolean getUnless()(Code) | | Returns the unless condition. If the unless condition is true, this
component is ignored. If the if condition (
AbstractComponent.getIf ) is true,
this component is ignored, too. Components deriving from this class shall
invoke
AbstractComponent.isEffective to know the result.
Default: false.
|
isEffective | public boolean isEffective()(Code) | | Returns whether this component is effective. If false, this component does
nothing (as if not specified at all).
|
isSuppressed | protected boolean isSuppressed()(Code) | | Return true if rendering should be suppressed because
of any of the follow reasons.
- The component is a facet (whose rendering, if any), is always
the responsibility of the owing component.
- The component has its
rendered property set
to false .
- The component is a child of a parent whose
rendersChildren is true .
- The component is a child of a parent whose rendering is itself
suppressed.
|
loadZULTree | protected void loadZULTree(org.zkoss.zk.ui.Page page, StringWriter writer) throws IOException(Code) | | Call by RootComponent or BranchComponent to load tree structure of zk zul components.
This method is invoked from a RootComponent's encodeEnd() or a BranchComponent's loadZK().
It will go through all ZULJSF Component Tree to initial ZUL Component of corresponding ZULJSFComponent.
Note: Do nothing in default implementation.
|
restoreState | public void restoreState(FacesContext context, Object state)(Code) | | Override Method, restore the state of this component.
|
saveAttachedMapState | protected static Object[] saveAttachedMapState(FacesContext context, Map mapObject)(Code) | | a convenient to save the state of a Map.
Parameters: context - FacesContext Parameters: mapObject - a Map to save two handled Object, Object[0] handle the state of keys of Map, Object[1] handle the state of values of Map. |
saveState | public Object saveState(FacesContext context)(Code) | | Override Method, save the state of this component.
|
setBodyContent | public void setBodyContent(String content)(Code) | | Set BodyContnet, this method is called by
org.zkoss.jsf.zul.tag.impl.AbstractTag to setup JSP Body
Content, developer rarely call this method.
Parameters: content - content of this component |
setIf | public void setIf(boolean ifcond)(Code) | | Sets the if condition.
|
setUnless | public void setUnless(boolean unless)(Code) | | Sets the unless condition.
|
|
|