From: "C.F. Scheidecker Antunes" <[EMAIL PROTECTED]>
Once the form is submited I need to show the radio group again on the next
page with the one selected already checked.
How can I check this DynaActionForm from the session on the JSP and see if
the corresponding radiobutton is to be checked or not?
You shouldn't have to... if you use the Struts tags, the framework will
automatically render the correct radio button as "on". Is the second page
using the same session-scoped form bean?
<logic:iterate id="row" name="rowCatSet" property="rows">
<input name="cat_ID" type="radio" value="<bean:write name="row"
property="catID"/>">
<bean:write name="row" property="Title"/>
</logic:iterate>
The problem is that I am already iterating a bean to fill up the value of
the radiobuttons. If I am to use the <html:radio/> tag
then I would need a way to have the bean row catID property value inside
the tag. How can I accomplish it?
I'd do it with Struts-EL and JSTL... I can only find a multibox example at
the moment:
<c:forEach items="${accountMap}" var="item" >
<html-el:multibox property="accounts" value="${item.key}"/>
<c:out value="${item.key}"/>
</c:forEach>
I haven't used it, but the docs say there is an 'idName' parameter for
<html:radio> that might be useful. As usual, I can't quite work out what
value you should use for the attribute: "When the idName attribute is
present, the value attribute is used as the name of the property on the
idName bean that will return the value of the radio tag for this iteration."
http://struts.apache.org/userGuide/struts-html.html#radio
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]