jQuery in Action, 3rd edition
The moose likes JSF and the fly likes Conditionally rendering fields in JSF 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Conditionally rendering fields in JSF 2.0" Watch "Conditionally rendering fields in JSF 2.0" New topic
Author

Conditionally rendering fields in JSF 2.0

David Lidz
Greenhorn

Joined: Mar 30, 2011
Posts: 14
The only real implementation I can think of is by using Javascript to hide/show a tag.
But I want a more Ajax approach to it by sending the request to the server when the tag is to be rendered.
Is it possible to make such an implementation using Ajax in JSF 2.0?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17155
    
  27

I do it all the time. Just indicate that AJAX is to re-render the field(s), and have the AJAX-invoked server-side method set properties that can be queried in a "rendered=" attribute EL expression on the fields being re-rendered.


An IDE is no substitute for an Intelligent Developer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Conditionally rendering fields in JSF 2.0
 
It's not a secret anymore!