Insights into Java Server Faces

2010/10/17

Wrapping PartialViewContext – or howto automatically add clientIds to render on AJAX requests

Filed under: JSF — Hanspeter @ 19:39

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…)

Advertisements

2010/10/13

Pass component references using simple bindings management

Filed under: JSF — Hanspeter @ 22:02

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…)

Create a free website or blog at WordPress.com.