
org.zkoss.jsf.zul.Textbox Maven / Gradle / Ivy
The newest version!
/* Textbox.java
{{IS_NOTE
Purpose:
Description:
History:
Aug 8, 2007 5:48:27 PM 2007, Created by Dennis.Chen
}}IS_NOTE
Copyright (C) 2007 Potix Corporation. All Rights Reserved.
{{IS_RIGHT
This program is distributed under GPL Version 2.0 in the hope that
it will be useful, but WITHOUT ANY WARRANTY.
}}IS_RIGHT
*/
package org.zkoss.jsf.zul;
import org.zkoss.jsf.zul.impl.BranchInput;
import org.zkoss.zk.ui.Component;
/**
* Textbox is a JSF component implementation for org.zkoss.zul.Textbox,
* This class also implements {@link 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 {@link java.lang.String}
*
*
* Example of use bidirection value binding:
*
* <z:textbox f:value="#{yourBean.value}" />
*
*
*
*
* Example of using immediate:
*
* <z:textbox f:immediate="true" />
*
*
*
* Example of using required:
*
* <z:textbox f:required="true" />
*
*
* Example of using converter:
*
* <z:textbox f:converter="yourBean.convertMethod"/>
* or
* <z:textbox >
* <f:converter converterId="yourConverterId"/>
* </z:textbox>
*
*
* Example of using validator:
*
* <z:textbox f:validator="yourBean.validateMethod"/>
* or
* <z:textbox >
* <f:validator validatorId="yourValidatorId"/>
* </z:textbox>
*
*
* Example of using converter:
*
* <z:textbox >
* <f:valueChangeListener type="your.ValueChangeListener"/>
* </z:textbox>
*
* This component should be declared nested under {@link org.zkoss.jsf.zul.Page}.
*
* To know more ZK component features you can refer to http://www.zkoss.org/
*
* @author Dennis.Chen
* @see org.zkoss.zul.Textbox
* @see javax.faces.component.EditableValueHolder
*/
public class Textbox extends BranchInput{
protected Component newComponent(Class use) throws Exception {
return (Component) (use==null?new org.zkoss.zul.Textbox():use.newInstance());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy