A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
hide radio button
Joined: Oct 15, 2006
Feb 24, 2009 21:56:09
i have 3 radio button on my form, and i only want to display 1 radio button when i load page as the 2nd radio button should appear only 1st radio button is selected.
How do i hide the 2nd radio button? I try to use the following, but it doesn't work, i will still show all the radio button at 1 go.:
pSelect= new HtmlSelectOneRadio(); pItem1= new UISelectItem(); pItem2= new UISelectItem(); pItem3= new UISelectItem(); pSelect.setRendered(true); pItem1.setRendered(true); pItem2.setRendered(false); pItem3.setRendered(false);
can i use rendered attribute for selectItem? if no, what should i use?
Joined: Oct 08, 2006
Feb 25, 2009 06:22:51
You can't. Just accordingly generate/change the list on every request.
I agree. Here's the link:
subject: hide radio button
using jsp:include with page attribute as an expression
UnChecking a single radio button
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014