• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

equivalent of checked attribute of radio button in struts

 
Pranav Pal
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the equivalent attribute of "checked" attribute of <input type="radio"> in <html:radio>?
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic