You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Liu, Benson" <be...@sscims.com> on 2005/05/11 20:21:10 UTC
nested:iterate and nested:hidden question
Hi,
I have a nested object hierarch as follows:
public Class Discrepancy {
String[] discrepancyIds;
}
public Class CashException {
Collection discrepancies; // collection of Discrepancy objects
}
In my JSP, I tried the following:
<nested:iterate property="discrepancies" >
<nested:iterate id="discrepancyId" property="discrepancyIds" >
<nested:hidden property="discrepancyId" /> <!-- ??? -->
</nested:iterate>
</nested:iterate>
How would I generate hidden tags for all of the nested Id fields?
I also tried:
Thanks in advance,
-Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: nested:iterate and nested:hidden question
Posted by Rick Reumann <st...@reumann.net>.
Liu, Benson wrote the following on 5/11/2005 2:21 PM:
> public Class Discrepancy {
> String[] discrepancyIds;
> }
>
> public Class CashException {
> Collection discrepancies; // collection of Discrepancy objects
> }
>
> In my JSP, I tried the following:
>
> <nested:iterate property="discrepancies" >
> <nested:iterate id="discrepancyId" property="discrepancyIds" >
> <nested:hidden property="discrepancyId" /> <!-- ??? -->
> </nested:iterate>
> </nested:iterate>
>
> How would I generate hidden tags for all of the nested Id fields?
I think the following should do what you want...
(if not using JSP2.0 use the appropriate nested-el tag)
<nested:iterate property="discrepancies" >
<nested:iterate id="discrepancyId" property="discrepancyIds" >
<nested:hidden property="discrepancyIds" value="${discepancyId}"/>
</nested:iterate>
</nested:iterate>
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org