struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Reumann <strut...@reumann.net>
Subject Re: nested:iterate and nested:hidden question
Date Wed, 11 May 2005 21:07:34 GMT
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


Mime
View raw message