File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Dynamic JSF pages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Dynamic JSF pages" Watch "Dynamic JSF pages" New topic
Author

Dynamic JSF pages

Gopu Akraju
Ranch Hand

Joined: Jan 13, 2008
Posts: 242
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

Joined: Jun 25, 2001
Posts: 15641
    
  15

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Gopu Akraju
Ranch Hand

Joined: Jan 13, 2008
Posts: 242
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic JSF pages
 
Similar Threads
Basic steps in Portal Development
JSF Vs Struts (Portlets perspective)
Best practice for secure login authorisation
retrieve data from database
create object within jsp