This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Render textfield based on other component  RSS feed

 
sneha patil
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using primefaces 3.2.In my form i am selecting radio button and on selection of Yes i want to display textfield.any idea???
Any help will be appreciated...

Thanks in advance...
 
Kumaravadivel Subramani
Ranch Hand
Posts: 171
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As a simple way just have hidden <td> which contains text field and make it display when the radio button is selected as "yes".
 
sneha patil
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply...
But i want to know which tag is used to do that behavior??
 
vipul bondugula
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I work on icefaces. In icefaces we use rendered attribute for the components.

suppose a inputText component. It will have rendered attribute. In backing bean we take a boolean property. That property is assosciated to rendered attribute using Expression Language.

As boolean value default will be false, at first component will not be visible. For the radio button we set partialSubmit="true" attribute enabling asynchronous request. If the radio button is clicked, a request will be fired and enables the text box.


check in primefaces if the same functionality is available or not...
 
sneha patil
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks vipul...
In primefaces i have rendered attribute...
Can you give me example code.....
Thanks..
 
vipul bondugula
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my previous post i gave you explanation. follow the procedure..

If you did not work out, post the code then..Then we can work out..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!