Category Archive: JSF

Feb 17

JSF- Build Error Handling (Empty Input Fields)

1. First, you build the xhtml file

The correct label should be declared as:

and the correct error message should be declared as:

with “for” as same as “name” of the target. 2. and then build user.java

Feb 17

JSF #TAG

this tutorial will be about xhtml using list item using java class. First, you initialized the index.xhtml the dynamic value of form.yearItems. <h:selectOneMenu value=”#{form.yearOfBirth}” required=”true”> <f:selectItems value=”#{form.yearItems}” /> </h:selectOneMenu> 2. Initialized the java class for getYearItems (remember! variable for yearItems must be declared getYearItems) and then return to other variables (integer or String) public Collection<SelectItem> getYearItems() …

Continue reading »