What I meant before is that something like this:
<s:radio name="selectedId" list="myMap"/>
puts everything on the same line. And there is no place there to add a
<br/> tag.
I found a solution in the end, after googling a bit more and with more
relevant keywords:
<s:iterator value="myMap.values()">
<s:radio name="selectedId" list="#{id: name}"/><br/>
</s:iterator>
Assuming the action exposes a map of id and some object with the [id, name]
properties. The map key "id" is the object id field and selectedId receives
the id of the selected object.
http://www.daniweb.com/forums/thread159633.html
http://struts.apache.org/2.x/docs/how-do-i-render-a-single-radio-button.html
I also came across a discussion in the XWork world about adding a "vertical"
parameter to the radio tag. That'd be a great idea. Hope we will have that
in next version of Struts2 too.
On Sat, Jan 24, 2009 at 3:30 PM, Lukasz Lenart <[email protected]
> wrote:
> 2009/1/24 Daniel Ruan <[email protected]>:
> > The simple theme does not work for me... My entire app uses the simple
> theme
> > (<constant name="struts.ui.theme" value="simple" />). I also tried
> > theme="simple" at the s:radio level but to no avail.
>
> So then, put <br/> tag after each.
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>