struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmicciche <jerry.micci...@ibx.com>
Subject Nested Collections and Beans
Date Tue, 20 Jun 2006 18:29:34 GMT

<p>I have a collection of beans and within each of those beans is a
collection of another type of bean.  When I use the following code the
values display correctly.  However the problem is when the page submits the
set methods of the inner bean never gets called.  All of the data changed on
the outer bean is updated and the inner bean remains unchanged.  Is there a
trick to this?
How do I ensure the set methods are called.  Thanks in advance!

<P>&lt;nested:iterate property="members" id="members"
indexId="index"&gt;</P>
		
		<P>&lt;tr&gt;</P>
		<P>&lt;%System.out.println("stop"); %&gt;</P>
		<P>	&lt;td&gt;&lt;nested:checkbox property="status" name="members"
indexed="true" value="C"/&gt;&lt;/td&gt;</P>
		<P>	&lt;td class="fldNameL"&gt;</P>
				
		<P>		&lt;nested:text name="members" property="name" indexed="true"
/&gt;</P>
		<P>		&lt;nested:hidden name="members" property="rowStatus"
indexed="true"/&gt;</P>
		<P>	&lt;/td&gt;</P>
		<P>&lt;/tr&gt;</P>
		<P>&lt;tr&gt;</P>
		<P>	&lt;td&gt;Coverage:&lt;/td&gt;&lt;td&gt;&lt;nested:text
name="members"
property="coverage" indexed="true" /&gt;&lt;/td&gt;</P>
		<P>&lt;/tr&gt;</P>
		<P>&lt;tr&gt;</P>
			<P>&lt;td&gt;PCP:&lt;/td&gt;&lt;td&gt;&lt;nested:text
name="members"
property="PCP" indexed="true"/&gt;&lt;/td&gt;</P>
		<P>&lt;/tr&gt;</P>
		<P>	&lt;tr&gt;&lt;td&gt;Dependents&lt;/td&gt;&lt;/tr&gt;</P>
			
				
		<P>	&lt;nested:iterate property="dependents" id="dependents"
indexId="index1"&gt;</P>
			<P>&lt;tr&gt;</P>
			<P>	&lt;td&gt;Name:&lt;/td&gt;</P>
			<P>	&lt;td&gt;&lt;nested:text property="name"
indexed="true"/&gt;&lt;/td&gt;</P>
				
			<P>&lt;/tr&gt;</P>
			<P>&lt;tr&gt;</P>
			<P>	&lt;td&gt;PCP&lt;/td&gt;</P>
			<P>	&lt;td&gt;&lt;nested:text property="PCP" indexed="true"
/&gt;&lt;/td&gt;</P>
			<P>&lt;/tr&gt;</P>
		<P>&lt;/nested:iterate&gt; </P>
		
		
		<P>&lt;tr&gt;</P>
		<P>	&lt;td
colspan="2"&gt;-----------------------------------------------------------------------&lt;/td&gt;</P>
		<P>&lt;/tr&gt;</P>
		<P>&lt;/nested:iterate&gt;</P>
--
View this message in context: http://www.nabble.com/Nested-Collections-and-Beans-t1819411.html#a4960778
Sent from the Struts - Dev forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message