You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Otto, Frank" <ot...@delta-barth.de> on 2004/02/05 13:14:35 UTC
AW: REPOST: newbie - How to generate form controls dynamically in
struts
Hi,
use the iterator tag in this way:
<logic:iterator name="myForm" property="myBean" id="list">
<html:radio name="myForm" property="myPropertyOfSelectedValue" idName="list" value="id">
<bean:write name="list" property="name"/>
</html:radio>
</logic:iterator>
Regards,
Frank
-----Ursprungliche Nachricht-----
Von: Sudip Kumar Bhattacharya [mailto:sudip@consulting.stgintl.com]
Gesendet: Donnerstag, 5. Februar 2004 12:50
An: Struts Users Mailing List
Betreff: REPOST: newbie - How to generate form controls dynamically in
struts
Reposting my query since nobody answered it...
-----Original Message-----
From: Sudip Kumar Bhattacharya [mailto:sudip@consulting.stgintl.com]
Sent: Wednesday, February 04, 2004 4:45 PM
To: Struts Users Mailing List
Subject: newbie - How to generate form controls dynamically in struts
Hi friends,
I need to create some controls dynamically which should be struts enabled.
Sample output code is as follows.
How can I use some collection/array to store the information, and then
render the html:fields, so that they are handled by struts like normal
hardcoded controls? I have seen some logic:iterator samples using
bean:message tags in them, but I could not find any sample that demonstrates
outputting struts html controls using an iterator.
-----------------------
<TR>
<TD>English taken for 9th grade credit</TD>
<TD><html:radio value=1 property=eng9/></TD>
<TD><html:radio value=2 property=eng9/></TD>
<TD><html:radio value=1 property=eng9_grade/></TD>
<TD><html:radio value=2 property=eng9_grade/></TD>
<TD><html:radio value=3 property=eng9_grade/></TD>
<TD><html:radio value=4 property=eng9_grade/></TD>
<TD><html:radio value=5 property=eng9_grade/></TD>
<TD><html:radio value=1 property=eng9a/></TD>
<TD><html:radio value=2 property=eng9a/></TD>
<TD><html:checkbox value=3 property=eng9h/></TD>
</TR>
<TR>
<TD>English taken for 10th grade credit</TD>
<TD><html:radio value=1 property=eng10/></TD>
<TD><html:radio value=2 property=eng10/></TD>
<TD><html:radio value=1 property=eng10_grade/></TD>
<TD><html:radio value=2 property=eng10_grade/></TD>
<TD><html:radio value=3 property=eng10_grade/></TD>
<TD><html:radio value=4 property=eng10_grade/></TD>
<TD><html:radio value=5 property=eng10_grade/></TD>
<TD><html:radio value=1 property=eng10a/></TD>
<TD><html:radio value=2 property=eng10a/></TD>
<TD><html:checkbox value=3 property=eng10h/></TD>
</TR>
-------------------------
Thanks in advance
Sudip
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org