• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Other approach to pre-select radio button

Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been searching on how to pre-select a radio button using struts tags, and so far, the only way is to define its value on its action form.

Is there other way to do it?
How about if I am going to use DynaValidatorForm?

Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As long as you set the property value prior to the point at which the JSP code is run, you can do it anywhere you like.

- In the Action class that forwards to the JSP.
Example: myForm.setRadioValue("xyz");
DynaForm Example: dynaForm.set("radioValue", "xyz");
- in the JSP itself
Example <c:set target="myForm" property="radioValue" value="xyz" />
DynaForm Example: <c:set target="myForm.map" property="radioValue" value="xyz" />
[ June 21, 2007: Message edited by: Merrill Higginson ]
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic