struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Degoutin Jean-Philippe <>
Subject How to manage s:radio or s:select in s:iterator (Struts2)
Date Fri, 06 Mar 2009 10:51:15 GMT
My problem is as follow :

I iterate over a map of objects and theses objects contains a property that I want to expose
in a s:radio.

Like this : I got a map "myMap" with 2 properties :
                - P1, the unique identifier of the object (P1 is also the key value of the
                - P2 the property I want to expose as a s:radio (I also expose it a 2nd time
as a s:textfield)

      <s:iterator value="myMap" >

            <s:textfield value="%{value.P1}" name=" myMap['%{key}'].P1"/>

            <s:radio list="#{'1':'1','2':'2','3':'3'}"





            <s:textfield value="%{value.P2}" name="myMap['%{key}'].P2"/>


My map is initialized with several objects and properties of objects are also initialized.
 Result : When I display, I see P1 and P2 in the textfield but nothing is checked in radio
                When I submit, I can retrieve datas in texfields but not those in s:radio.

And it's exactly the same when I replace the s:radio by a s:select.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message