JSF: Handling Dates in JSF Forms

In this article, I show you code examples on how to handle dates in JSF forms. The project consists of three files: - StudentTest.java - student_date_test_form.xhtml - student_date_test_response.xhtml The user enters the student data into the form: first name, last name and hire date. The input format for the hire date is day, month, year. As an example For 1 [...]

By |2016-05-03T10:40:52-04:00May 3, 2016|JavaServer Faces (JSF)|Comments Off on JSF: Handling Dates in JSF Forms

JSF: Setting itemLabel with selectItems

JSF provides UI components for drop-down lists. Drop-down lists are called selectOneMenu in JSF. When you use the components, you may have the requirement to use different values for the itemLabel and itemValue. You can accomplish this by making use of a Map collection (java.util.Map). The Map collection is a collection of key-value pairs. In JSF, you provide a reference [...]

By |2015-10-13T16:56:32-04:00October 13, 2015|How-To, JavaServer Faces (JSF)|Comments Off on JSF: Setting itemLabel with selectItems

JSF 2.2 Namespaces – JSF Tutorial

JSF 2.2 introduced a list of namespaces for the JSF components. In the list below, I show the old namespace along with the new one: Library Old URI New URI Composite Components http://java.sun.com/jsf/composite http://xmlns.jcp.org/jsf/composite Faces Core http://java.sun.com/jsf/core http://xmlns.jcp.org/jsf/core HTML http://java.sun.com/jsf/html http://xmlns.jcp.org/jsf/html JSTL Core http://java.sun.com/jsp/jstl/core http://xmlns.jcp.org/jsp/jstl/core JSTL Functions http://java.sun.com/jsp/jstl/functions http://xmlns.jcp.org/jsp/jstl/functions Facelets Templating http://java.sun.com/jsf/facelets http://xmlns.jcp.org/jsf/facelets Pass Through Attributes http://java.sun.com/jsf/passthrough http://xmlns.jcp.org/jsf/passthrough Pass Through [...]

By |2015-07-22T21:49:43-04:00July 22, 2015|How-To, Java, JavaServer Faces (JSF)|Comments Off on JSF 2.2 Namespaces – JSF Tutorial
Go to Top