File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Is this possible? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Is this possible?" Watch "Is this possible?" New topic

Is this possible?

Carlos Conti
Ranch Hand

Joined: Apr 21, 2010
Posts: 131
Actually have just found the way.

Sorry and thanks.

Hi there,
I have been programming with JSF (1.2) for a little while, and wonder if the following is possible:

I want to use a JSF template where I put references to "any" backing bean which will holds an instance of a specific type, let's say ADDRESS for example.

This would be extremely useful because I could have defined one single template for the address type which I would call from the container files und update ADDRESS fields like "${[ANY_BACKINGBEAN_PARAMETER].address.zipCode}". I know I still have the solution of creating an AddressBackingBean and reference it from the template (which I actually do), but then I must be caring for updating the reference throughout the application, which means handling the coordination of bean initialization in the PhaseListener when accessing a specific page.

The whole thing involves considerable tasks in coordinating and assigning the right references at the right time.

Hope the issue is clear. From my understanging I guess that a real template framework should enable this feature. However I still haven't figured out how to do this in JSF. Perhaps available in JSF 2.0?

Many thanks.


I agree. Here's the link:
subject: Is this possible?
It's not a secret anymore!