JSF Pages and Bean Properties
Input field values are bound to bean properties. For example (from index.jsp),
<h:inputText value="#{user.name}"/>
- Bean user is defined in faces-config.xml (addressed later,
along with #{...} syntax)
- When page is displayed, getName is called to obtain current
property value (empty string to start)
- When page is submitted, setName is called to set value the user
entered
Output field values can also be bound to bean properties. For example (from
welcome.jsp) ,
<h:outputText value="#{user.name}"/>
- When page is displayed, getName is called to add to output string