Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying inputfield or dropdownbox depending on condition

 
Per-Morten Lindanger
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi , you can use panel ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic