*
The moose likes JSF and the fly likes Displaying inputfield or dropdownbox depending on condition Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Displaying inputfield or dropdownbox depending on condition" Watch "Displaying inputfield or dropdownbox depending on condition" New topic
Author

Displaying inputfield or dropdownbox depending on condition

Per-Morten Lindanger
Greenhorn

Joined: Oct 13, 2008
Posts: 10
I'm rather new to JSP and JSF, and unaware of the limitations.
What I wish to do, is to display a dropdown box if a condition is true, or display a inputfield if the condition is false.

I am aware of the posibility to just set the rendered="#{!bean.variable}" and rendered="#{bean.variable}", but that is a very messy way to go, since I have more then 100 components on the page where this is required.

Are there any existing UIComponents that does this for me?

Example:
A input field that has a dropdown box that appears only if there is a list of choices available?
Rodrigo Mendes
Greenhorn

Joined: Feb 01, 2009
Posts: 1
Hi , you can use panel ...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying inputfield or dropdownbox depending on condition
 
Similar Threads
how to display values from database in a dropdown box?
How to create a h:selectOneMenu with a default value?
Dynamic dropdownbox
how to get values in dropdown box from database?
dropdown values - change - dipplay corresponding jsp page