Imagine a JSF 2.0 based input view working with AJAX and you have h:messages positioned above of this input form – and you want the messages area to be rerendered on each validation step. You now will have to add the clientId of h:messages to all f:ajax render=”..” behavior definitions – or somehow add the clientId of h:messages automatically to the list of components to be rendered on partial requests. This article will show how to implement the automatic adding of a clientId to the list of components to render on partial view requests. (more…)
2010/10/17
2010/10/13
Pass component references using simple bindings management
Sometimes binding of UIComponent comes in very handy. For example if you want to pass client ids into a composite component to alow the cc to use these ids with attributes. It would be very boring to specify the full client ids explicitly. This article will show how component references can be passed on in a simple generic way.
(more…)
2010/04/06
Using File Upload in JSF Portlets with Weblogic Portal
According to this Oracle whitepaper it is not possible to use Tomahawk File Upload within a JSF Portlet – they recommend to use a non JSF Portlet for that. Well, we found a solution to get File Upload working within JSF Portlets. (more…)
2010/01/04
Combine multiple properties files into one ResourceBundle
Sometimes it would be nice to combine multiple properties files into one single ResourceBundle. For example, a part of the resources is provided by some library and anothe part of the resources should be provided by the application using that library.
2009/08/06
MultiValidator component allows validation across multiple input fields
JSF provides validation, you can even attach multiple validators to a single input component. But it does not (yet?) support validation across multiple input components. To address this shortcoming we developed a MultiValidator component. (more…)
2009/07/22
Reduce server side state size with JSF 1.2 and Facelets by 30-60%
Beside his appointments at Jazoon 2009 we had the opportunity to have Ed Burns at our office in Credit Suisse (CS) to work on some suggenstions regarding JSF improvements. After a short discussion it was agreed that there is only one point to look at on the currently used JSF 1.2 and Facelets – the other improvements will most likely be covered by JSF 2.0 or would have to be looked into later. (more…)
2009/07/20
using a custom Lifecycle implementation to handle Exceptions in JSF 1.2
Real application need to handle unexpected Exceptions in a save way by e.g. render an error page and behave according to the type of exception (some exceptions might allow to show a message and continue with the application, other might need to terminate the session). JSF 2.0 will provide exception handling support, but you can also handle exceptions before JSF 2.0 using a custom lifecycle as shown below.
2009/07/03
Using Custom factories or howto wrap FacesContext
Sometimes you need to wrap FacesContext or even ExternalContext. For our component library we have several needs to do so – e.g. to wrap RequestParameterMap or SessionMap to provide some generic functionality. In JSF 1.2 ExternalContext cannot be wrapped directly – one needs to wrap FacesContext to hook in a wrapped ExternalContext.