001: /* BaseDecimalbox.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.BaseDecimalbox;
022: import org.zkoss.zk.ui.Component;
023:
024: /**
025: * Decimalbox is a JSF component implementation for {@link org.zkoss.zul.Decimalbox},
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.math.BigDecimal}
036: *
037: * <p/>
038: * Example of use bidirectional value binding:<br/>
039: * <pre>
040: * <z:decimalbox f:value="#{yourBean.value}" />
041: * </pre>
042: *
043: *
044: * <p/>
045: * Example of using immediate:<br/>
046: * <pre>
047: * <z:decimalbox f:immediate="true" />
048: * </pre>
049: *
050: * <p/>
051: * Example of using required:<br/>
052: * <pre>
053: * <z:decimalbox f:required="true" />
054: * </pre>
055: * <p/>
056: * Example of using converter:<br/>
057: * <pre>
058: * <z:decimalbox f:converter="yourBean.convertMethod"/>
059: * or
060: * <z:decimalbox >
061: * <f:converter converterId="yourConverterId"/>
062: * </z:decimalbox>
063: * </pre>
064: * <p/>
065: * Example of using validator:<br/>
066: * <pre>
067: * <z:decimalbox f:validator="yourBean.validateMethod"/>
068: * or
069: * <z:decimalbox >
070: * <f:validator validatorId="yourValidatorId"/>
071: * </z:decimalbox>
072: * </pre>
073: * <p/>
074: * Example of using converter:<br/>
075: * <pre>
076: * <z:decimalbox >
077: * <f:valueChangeListener type="your.ValueChangeListener"/>
078: * </z:decimalbox>
079: * </pre>
080: *
081: * <p/>
082: * In some application server which doesn't support attribute namespace you can use attribute prefix 'f_' to replace attribute namespace
083: * <br/>
084: * For example,
085: * <pre>
086: * <z:decimalbox f_value="#{yourBean.value}" />
087: * </pre>
088: *
089: * <p/>
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.Decimalbox
096: * @see javax.faces.component.EditableValueHolder
097: */
098: public class Decimalbox extends BaseDecimalbox {
099:
100: }
|