The Java EE 5 Tutorial

UIInput and UIOutput Properties

The following tag binds the name component to the name property of CashierBean.

<h:inputText id="name" size="50"
         type="com.sun.bookstore6.listeners.NameChanged" />

Here is the bean property bound to the name component:

protected String name = null;
 public void setName(String name) { = name;
public String getName() {

As Using the Standard Converters describes, to convert the value of a UIInput or UIOutput component, you can either apply a converter or create the bean property bound to the component with the desired type. Here is the example tag explained in Using DateTimeConverter that displays the date books will be shipped:

<h:outputText value="#{cashier.shipDate}">
    <f:convertDateTime dateStyle="full" />

The application developer must ensure that the property bound to the component represented by this tag has a type of java.util.Date. Here is the shipDate property in CashierBean:

protected Date shipDate;
public Date getShipDate() {
    return this.shipDate;
public void setShipDate(Date shipDate) {
    this.shipDate = shipDate;

See Binding Component Values and Instances to External Data Sources for more information on applying a Converter implementation.