• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Which JSF component to use?

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.)
 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Saloon Keeper
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic