• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic JSF pages

 
Gopu Akraju
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have done very basic and simple JSF application. Now would like to explore more. In my first application, I tried this but couldn't do it and a very basic static page b'cos, when the page gets refreshed, I was not able to get the value of updated components value through backing beans and also discussed in one of the thread here.

Now I would like to try again.

I have a dropdown menu. And depending upon the user's selection, I want to display another set of drop down list. I know with JSF alone, I can't achieve this? Do I have to try with Ajax to achieve this? If there are any simple example to start, that would be a great help.

Regards
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18226
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anything web-based is less interactive than a desktop app, simply because it all has to go through the request/response cycle. You can do what you want in straight JSF - you just have to go through page refreshes each time you want to update the display or the data in it.

The virtue of AJAX is that, while there's still a request/response interaction, it can be limited to re-rendering only parts of a page instead of the whole thing. Which makes the display update less intrusive and, because the amount of work is less, makes the display more responsive.

I have become a major fan of RichFaces - it provides AJAX support - including things like what you want. So do a number of other JSF component packages, but this is the one I've been using lately.

The main advantage of using AJAX JSF components is that they not only have pre-debugged solutions for common tasks, they relieve you of having to write all the customizations for all the different web browsers - and just as important - can help you fall back to plain old non-AJAX operations when dealing with people who've turned Javascript off.
 
Gopu Akraju
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim. Could you please specifically tell me which one to use. I have used only tomahawk till now along with JSF.

For my above requirements, which one to use? Is Ajax and richfaces different? Just started doing my homework on this even though I am new to JSF also.

Initially on a web page, I will have jsut one drop down menu and depending upon the user's selection, I have to show them a list of items for their input. Basically I have two sets of items. And hence I need to check the user's selection from the list and display the list of items in the same page.

I can always navigate the user into another page if I use JSF alone and get their input values. But I want to do it in a sophesticated manner. Please guide me.

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic