aspose file tools*
The moose likes Struts and the fly likes equivalent of checked attribute of radio button in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "equivalent of checked attribute of radio button in struts" Watch "equivalent of checked attribute of radio button in struts" New topic
Author

equivalent of checked attribute of radio button in struts

Pranav Pal
Ranch Hand

Joined: Nov 04, 2007
Posts: 74
What is the equivalent attribute of "checked" attribute of <input type="radio"> in <html:radio>?


Hakuna Matata!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
There is no such equivalent. A Struts <html:radio> tag is tied to the ActionForm bean property specified in the tag. If the ActionForm property is set to the value specified in the tag, the button will show as checked. Otherwise, it will show as unchecked. Example:

In the above example, if the form bean property "color" contains "blue, the second button will be checked.


Merrill
Consultant, Sima Solutions
 
Consider Paul's rocket mass heater.
 
subject: equivalent of checked attribute of radio button in struts
 
Similar Threads
select a radio button
html radio
Question on using DisplayTag in JSPs
logic:iterate ?? Urgent - please help!!!!
Remembering the radiobtn/checkbox state between jsp pages