*
The moose likes JSF and the fly likes Which JSF component to use? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Which JSF component to use?" Watch "Which JSF component to use?" New topic
Author

Which JSF component to use?

Angus Rose
Ranch Hand

Joined: Jun 21, 2002
Posts: 56
Hi All,
I am building a page based on JSF/MyFaces. It is split into 2 areas - on the left a tree navigation structure and on the right an area in which the selected page (from the tree) will be rendered. So, if a user selects a link, the page is rendered opposite while the tree is still visible.

My question is: which is the best JSF/MyFaces component to use to render the pages, bearing in mind that the source for the page will be read from a backing bean?

Thanks in advance

Angus
g madhava
Ranch Hand

Joined: Sep 14, 2001
Posts: 85
Regarding your question for which component to use, it depends on what component(s) you plan to render on to the browser. Usually you can have a JSF datatable component, that will render as an "TABLE" in the html world.

Probably you can have 2 frames. One frame for the left and the other for the right.

This approach works well if the left frame data is driving the right frame or viceversa.

If you have a transaction happening on one frame, and submit that frame, but need to have the updated results in both the frames, then this might result in a non-deterministic behaviour. Since each request to the server will be a different request, and there is no guarantee which one will get completed first. So one would have to do depend on some hacks in the javascript.(using onload() functions.)
Fintan Conway
Ranch Hand

Joined: Apr 03, 2002
Posts: 141
Originally posted by Angus Rose:
Hi All,
I am building a page based on JSF/MyFaces. It is split into 2 areas - on the left a tree navigation structure and on the right an area in which the selected page (from the tree) will be rendered. So, if a user selects a link, the page is rendered opposite while the tree is still visible.


Hi Angus,

You could consider using Tiles with your application. Tiles is a layout templating mechanism that can be used in Struts or in JSF. You define one tile to hold the tree, one tile for the main page and put the tree tile on the LHS and the main tile on the right.

While this is not a JSF component per se, it is probably exactly what you need. See MyFaces tiles support for more info.

HTH,

Fintan
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15964
    
  19

I use the examples in this article to get started with Facelets tiling. My layout was almost identical to Angus'. It works great. The actual partitioning of the page is being done via CSS absolute boxes matched to the IDs of <div> tags defined in the templates.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
Consider Paul's rocket mass heater.
 
subject: Which JSF component to use?
 
Similar Threads
Render Response phase question
not enamored by JSF 1.1
Seam in Action: Can I mix Seam controls with non-seam JSF Controls
how to erase or hide or delete components in a page using JSF
Ajax with MyFaces Tree2 component