001: /* Doublebox.java
002:
003: {{IS_NOTE
004: Purpose:
005:
006: Description:
007:
008: History:
009: Aug 8, 2007 5:48:27 PM 2007, Created by Dennis.Chen
010: }}IS_NOTE
011:
012: Copyright (C) 2007 Potix Corporation. All Rights Reserved.
013:
014: {{IS_RIGHT
015: This program is distributed under GPL Version 2.0 in the hope that
016: it will be useful, but WITHOUT ANY WARRANTY.
017: }}IS_RIGHT
018: */
019: package org.zkoss.jsf.zul;
020:
021: import org.zkoss.jsf.zul.impl.BaseDoublebox;
022: import org.zkoss.zk.ui.Component;
023:
024: /**
025: * Doublebox is a JSF component implementation for {@link org.zkoss.zul.Doublebox},
026: * This class also implements {@link javax.faces.component.EditableValueHolder}.
027: * That means you can use bidirectional value binding, immediate, required, converter, validator, valueChangeListener features on this component.
028: * <br/>
029: * To use those features, you must declare a namespace of "http://java.sun.com/jsf/core"
030: * with a prefix (say 'f' in below example), add attribute of those feature with this namespace
031: * (for example f:required="true")in you jsf page.
032: * For more detail of EditableValueHolder features of JSF, you can refer to <a href="http://java.sun.com/products/jsp/">http://java.sun.com/products/jsp/</a>
033: *
034: * <p/>
035: * The default binding value of this component is {@link java.lang.Double}
036: *
037: * <p/>
038: * Example of use bidirectional value binding:<br/>
039: * <pre>
040: * <z:doublebox f:value="#{yourBean.value}" />
041: * </pre>
042: *
043: *
044: * <p/>
045: * Example of using immediate:<br/>
046: * <pre>
047: * <z:doublebox f:immediate="true" />
048: * </pre>
049: *
050: * <p/>
051: * Example of using required:<br/>
052: * <pre>
053: * <z:doublebox f:required="true" />
054: * </pre>
055: * <p/>
056: * Example of using converter:<br/>
057: * <pre>
058: * <z:doublebox f:converter="yourBean.convertMethod"/>
059: * or
060: * <z:doublebox >
061: * <f:converter converterId="yourConverterId"/>
062: * </z:doublebox>
063: * </pre>
064: * <p/>
065: * Example of using validator:<br/>
066: * <pre>
067: * <z:doublebox f:validator="yourBean.validateMethod"/>
068: * or
069: * <z:doublebox >
070: * <f:validator validatorId="yourValidatorId"/>
071: * </z:doublebox>
072: * </pre>
073: * <p/>
074: * Example of using converter:<br/>
075: * <pre>
076: * <z:doublebox >
077: * <f:valueChangeListener type="your.ValueChangeListener"/>
078: * </z:doublebox>
079: * </pre>
080: * <p/>
081: * In some application server which doesn't support attribute namespace you can use attribute prefix 'f_' to replace attribute namespace
082: * <br/>
083: * For example,
084: * <pre>
085: * <z:doublebox f_value="#{yourBean.value}" />
086: * </pre>
087: *
088: * <p/>
089: *
090: * This component should be declared nested under {@link org.zkoss.jsf.zul.Page}.
091: *
092: * <p/>To know more ZK component features you can refer to <a href="http://www.zkoss.org/">http://www.zkoss.org/</a>
093: *
094: * @author Dennis.Chen
095: * @see org.zkoss.zul.Doublebox
096: * @see javax.faces.component.EditableValueHolder
097: */
098: public class Doublebox extends BaseDoublebox {
099:
100: }
|