struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lowe <mark.l...@talk21.com>
Subject Re: nested iterators and writing back to the form
Date Fri, 06 Feb 2004 16:06:30 GMT
the method names and the scoped id name need to be the same i think, 
Its a quirk.


On 6 Feb 2004, at 16:38, Michael Wiles wrote:

>
> Even with the id's set correctly it doesn't write the value you enter
> into the html text box back onto the form.
>
> On Fri, 2004-02-06 at 16:31, Mark Lowe wrote:
>> The second list just needs the have the name of the object that
>> contains the list.
>>
>> At the moment you've got
>>
>> orders.getOrders()
>>
>> which i assume is wrong. If each order contains an iterate-able object
>> then that's what you want to reference in the nested one.
>>
>> i think you want
>>
>> <logic:iterate id="element" name="allocationOrder" property="orders">
>> 	<logic:iterate id="subElement" name="element" 
>> property="orderDetails">
>>
>> Notice the bean that is cast via the id attibute is what is 
>> referenced,
>> and then the iterate-able  structure in the property attribute.
>>
>> orders[0].getOrderDetails();
>>
>> Cheers Mark
>>
>> On 6 Feb 2004, at 13:32, Michael Wiles wrote:
>>
>>>
>>> I have a nested list...
>>>
>>> something like:
>>>
>>> <logic:iterate property="orders" name="allocationOrder"
>>> 		id="element">
>>> ..
>>> ..
>>> ..
>>> 	<logic:iterate property="orderDetails" name="orders"
>>> 		id="subElement">
>>> ..
>>> 			<html:text name="subElement" property="qty"/>
>>> ..
>>> 	</logic:iterate>
>>> </logic:iterate>
>>>
>>> How do I map the html:text tag back to the form?
>>>
>>> Without anything extra added to the form, it doesn't work.
>>>
>>>
>>>
>>>
>>> Read our disclaimer at: 
>>> http://www.picknpay.co.za/email-disclaimer.htm
>>> If you don't have web access, the disclaimer can be mailed to you on
>>> request.
>>> Disclaimer requests to be sent to it-security@pnp.co.za
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
>> Read our disclaimer at: http://www.picknpay.co.za/email-disclaimer.htm
>> If you don't have web access, the disclaimer can be mailed to you on 
>> request.
>> Disclaimer requests to be sent to it-security@pnp.co.za
> -- 
> Michael Wiles <mwiles@pnp.co.za>
> Pick 'n Pay IS - 1665
>
>
> Read our disclaimer at: http://www.picknpay.co.za/email-disclaimer.htm
> If you don't have web access, the disclaimer can be mailed to you on 
> request.
> Disclaimer requests to be sent to it-security@pnp.co.za
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


Mime
View raw message