You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by se...@ropardo.de on 2004/11/11 10:57:30 UTC

How to iterate neseted beans?

Hi,

I want to iterate through a nested bean, it is 3D.

The first bean contains an ArrayList, of the second bean. 
Each second bean contains an ArrayList of the third bean.
Each Third bean contains different attributes.

I want to print Attributes of the third bean in text-field and the user
should edit them 
and committ changes by pushing the submit-button.

I can call the getter of the attributes in the third bean, but how can I
make the
application call the setter?


This is my code... what should I do?

<nested:iterate id="line" property="resultList" name="kombinationForm">
	<nested:iterate id="elementLine" name="line" property="resultList">
		<nested:text name="elementLine" property="oneAtribute"/>
	</nested:iterate>
</nested:iterate>



Can anyone help me?
 

mfg Sebastian Steinfeld

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


Re: How to iterate neseted beans?

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
try...

<nested:iterate property="resultList" name="kombinationForm">
  <nested:iterate property="resultList">
    <nested:text property="oneAtribute"/>
  </nested:iterate>
</nested:iterate>

Niall

----- Original Message ----- 
From: <se...@ropardo.de>
To: <us...@struts.apache.org>
Sent: Thursday, November 11, 2004 9:57 AM
Subject: How to iterate neseted beans?


> Hi,
> 
> I want to iterate through a nested bean, it is 3D.
> 
> The first bean contains an ArrayList, of the second bean. 
> Each second bean contains an ArrayList of the third bean.
> Each Third bean contains different attributes.
> 
> I want to print Attributes of the third bean in text-field and the user
> should edit them 
> and committ changes by pushing the submit-button.
> 
> I can call the getter of the attributes in the third bean, but how can I
> make the
> application call the setter?
> 
> 
> This is my code... what should I do?
> 
> <nested:iterate id="line" property="resultList" name="kombinationForm">
> <nested:iterate id="elementLine" name="line" property="resultList">
> <nested:text name="elementLine" property="oneAtribute"/>
> </nested:iterate>
> </nested:iterate>
> 
> 
> 
> Can anyone help me?
>  
> 
> mfg Sebastian Steinfeld
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 


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