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
posted
0
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
posted
0
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.
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.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.