|
||||||||||
| 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
org.zkoss.jsf.zul.impl.BranchComponent
org.zkoss.jsf.zul.impl.BranchOutput
org.zkoss.jsf.zul.impl.BranchInput
org.zkoss.jsf.zul.impl.BaseTree
org.zkoss.jsf.zul.Tree
public class Tree
Tree is a JSF component implementation for Tree,
This class also implements EditableValueHolder.
That means you can use bidirection value binding, immediate, required, converter, validator, valueChangeListener features on this component.
To use those features, you must decleare a namespace of "http://java.sun.com/jsf/core"
with a prefix (say 'f' in below example), add attribute of those feature with this namespace
(for example f:required="true")in you jsf page.
For more detail of EditableValueHolder features of JSF, you can refer to http://java.sun.com/products/jsp/
String.
When listbox set multiple ot true(multiple selection, then
the default binding value of this component is String array.
Example of use bidirection value binding:
<z:tree name="role1" id="tree" f:value="#{SelectionTestBean.selection}">
<z:treechildren>
<z:treeitem value="1">
<z:treerow><z:treecell label="Item 1" /></z:treerow>
</z:treeitem>
<z:treeitem value="2">
<z:treerow>
<z:treecell label="Item 2" />
</z:treerow>
<z:treechildren>
<z:treeitem value="3">
<z:treerow>
<z:treecell label="Item 2.1" />
</z:treerow>
<z:treechildren>
<z:treeitem value="4">
<z:treerow>
<z:treecell label="Item 2.1.1" />
</z:treerow>
</z:treeitem>
</z:treechildren>
</z:treeitem>
</z:treechildren>
</z:treeitem>
</z:treechildren>
</z:tree>
Example of using immediate:<z:tree f:immediate="true" />Example of using required:
<z:tree f:required="true" />Example of using converter:
<z:tree f:converter="yourBean.convertMethod"/>
or
<z:tree >
<f:converter converterId="yourConverterId"/>
</z:tree>
Example of using validator:
<z:tree f:validator="yourBean.validateMethod"/>
or
<z:tree >
<f:validator validatorId="yourValidatorId"/>
</z:tree>
Example of using converter:
<z:tree >
<f:valueChangeListener type="your.ValueChangeListener"/>
</z:tree>
In some application server which doesn't support attribute namespace you can use attribute prefix 'f_' to replace attribute namespace
<z:tree f_value="#{yourBean.value}" />
This component should be declared nested under Page.
To know more ZK component features you can refer to http://www.zkoss.org/
Tree,
EditableValueHolder| Field Summary |
|---|
| Fields inherited from class org.zkoss.jsf.zul.impl.LeafComponent |
|---|
_compAttrMap, _composer |
| Fields inherited from class javax.faces.component.UIComponent |
|---|
bindings |
| Constructor Summary | |
|---|---|
Tree()
|
|
| Method Summary |
|---|
| Methods inherited from class org.zkoss.jsf.zul.impl.BaseTree |
|---|
afterZULComponentComposed, clientInputDecode, getMappedAttributeName |
| Methods inherited from class org.zkoss.jsf.zul.impl.BranchOutput |
|---|
getConverter, getLocalValue, getValue, isLocalValueSet, setConverter, setLocalValueSet, setValue, transferValueForAttribute |
| Methods inherited from class org.zkoss.jsf.zul.impl.BranchComponent |
|---|
loadZULTree |
| Methods inherited from class org.zkoss.jsf.zul.impl.LeafComponent |
|---|
addZULDynamicAttribute, encodeBegin, encodeChildren, encodeEnd, evaluateDynaAttributes, getAttributeValue, getComponentDefName, getComponentInfo, getForward, getRendersChildren, getUse, getZULComponent, setAttributeValue, setForward, setId, setUse, setZULDynamicAttribute |
| 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, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, 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 |
| Methods inherited from interface javax.faces.component.EditableValueHolder |
|---|
isLocalValueSet, setLocalValueSet |
| Methods inherited from interface javax.faces.component.ValueHolder |
|---|
getConverter, getLocalValue, getValue, setConverter, setValue |
| Constructor Detail |
|---|
public Tree()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||