Programming Tutorials

JSF Tutorials

1. Struts Vs JSF (A comparison of Struts against JSF)

By: Freddy Ng : 2008-08-13

Description: Though Struts and JSF have their own plus and minuses, here is a comparison of these two great technologies.


2. Calling Multiple Listeners in JSF

By: Daniel Malcolm : 2007-10-06

Description: There may be situations in which you want multiple value change listeners or multiple action listeners to respond to an event. In that case, you need a slightly different syntax to attach the listeners to the JSF element.


3. Action listeners in JSF

By: Charles : 2007-10-06

Description: Action listeners are provided by JSF to make it easier to handle action events. JSF already provides


4. <convertNumber> and <convertDateTime> in JSF

By: Baski : 2007-10-06

Description: The JSF implementation comes with two standard converters, one for numbers and one for dates and times: <convertNumber> and <convertDateTime>


5. faces-config.xml to DirectTraffic in the JSF Application

By: Abinaya : 2007-10-06

Description: Information about the view components in the web application and information about how control flows through the application is contained in a special configuration file named faces-config.xml, shown in Listing below. Although faces-config.xml can contain a lot of information about a web application, for this example we need it to do only two things: identify the flow of control from searchForm.jsp to searchResults.jsp, and identify the JavaBean used by the application.


6. JSF - TreeNode.setID gets IllegalArgument Exception

By: Kadhar : 2007-09-19

Description: This code may throw an IllegalArgument exception. To solve this problem you need to u need to adhere to the contract of UIComponent.setId():


7. Servlet error : java.lang.IndexOutOfBoundsException (JSF RI 1.1_01: IndexOutOfBoundsException)

By: Emiley J : 2007-09-19

Description: Are you getting this error? Once this exception occurs no users can use the web application anymore. Which is obviously a big problem.. So if you are getting this error something like the one shown below, then you can solve this by following this solution.


8. How to open a new browser window from my JSF page?

By: Carsten Kaiser : 2007-09-19

Description: The article describes different ways to open a new browser window from a JSF page and the involved advantages and drawbacks.


9. Using Javascript in JSF

By: Andrew Robinson : 2007-09-19

Description: The article describes how to trigger client side javascript functions with the <h:commandLink> and the <h:commandButton> components.


10. Accessing Context Data in Beans using JSF

By: Henry : 2007-09-18

Description: JSF provides access to the request data and other data through the FacesContext object. As the Javadoc states, "FacesContext contains all of the per-request state information related to the processing of a single JavaServer Faces request, and the rendering of the corresponding response . . . . A FacesContext instance is associated with a particular request at the beginning of request processing". Because a FacesContext instance, and the objects it contains, are associated with the thread processing a particular request, any references to the FacesContext instance or its contained objects must not be passed to another thread or stored for subsequent requests.