| Bandbox is a JSF component implementation for
org.zkoss.zul.Bandbox ,
This class also implements
javax.faces.component.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/
The default binding value of this component is
java.lang.String
Example of use bidirection value binding:
<z:bandbox f:value="#{yourBean.value}" />
Example of using immediate:
<z:bandbox f:immediate="true" />
Example of using required:
<z:bandbox f:required="true" />
Example of using converter:
<z:bandbox f:converter="yourBean.convertMethod"/>
or
<z:bandbox >
<f:converter converterId="yourConverterId"/>
</z:bandbox>
Example of using validator:
<z:bandbox f:validator="yourBean.validateMethod"/>
or
<z:bandbox >
<f:validator validatorId="yourValidatorId"/>
</z:bandbox>
Example of using converter:
<z:bandbox >
<f:valueChangeListener type="your.ValueChangeListener"/>
</z:bandbox>
In some application server which doesn't support attribute namespace you can use attribute prefix 'f_' to replace attribute namespace
For example,
<z:bandbox f_value="#{yourBean.value}" />
This component should be declared nested under
org.zkoss.jsf.zul.Page .
To know more ZK component features you can refer to http://www.zkoss.org/
author: Dennis.Chen See Also: org.zkoss.zul.Bandbox See Also: javax.faces.component.EditableValueHolder |