You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jacqueline Gomes <jg...@docep.wa.gov.au> on 2004/02/04 10:06:47 UTC
Logic Iterate - Cannot Create iterator for this collection
Hi All,
I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object.
I am trying to execute the following code:
<logic:iterate id="adminReceipts" name="paymntTrnsctns">
<div id="ExtractResults" style="width: 760px; background-color: #FFFFFF; border: 1px; padding: 1px; margin: 0px auto";>
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr class="extractResultsTRHeading" bgcolor="#FFFFFF">
<td class="extractResultsTD">
<bean:message key="prompt.label.receiptNumber"/>
</td>
<td class="extractResultsTD">
<bean:message key="prompt.label.dateTime"/>
</td>
</tr>
<tr class="extractResultsTRHeading" bgcolor="<jsp:getProperty name="colour" property="next"/>">
<td class="extractResultsTD">
<bean:write name="adminReceipts" property="receiptNumber"/>
</td>
<td class="extractResultsTD">
<bean:write name="adminReceipts" property="transactionDate"/>
</td>
</tr>
</table>
</div>
<logic:iterate id="adminPaymentDetails" name="adminReceipts">
</logic:iterate>
</logic:iterate>
Can anyone please tell me what I'm doing wrong.
Thanks,
Jackie.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Logic Iterate - Cannot Create iterator for this collection
Posted by Michael Wiles <mw...@pnp.co.za>.
You need to specify the name of the collection in the nested iterator
(the getter).
Add another parameter to the nested iterator line called property.
<logic:iterate id="adminPaymentDetails" name="adminReceipts"
property="<Property name of collection>"/>
</logic:iterate>
I'm having trouble referencing properties of the nested iterator.
On Wed, 2004-02-04 at 11:06, Jacqueline Gomes wrote:
> Hi All,
>
> I have a List collection (paymntTrnsctns) which contains an adminReceipts objects. One of the properties of adminReceipts is a list. So I display the normal string properties of the object, such as receiptNumber and transactionDate, but can't then get the list adminPaymentDetails within the adminReceipts object.
>
> I am trying to execute the following code:
>
> <logic:iterate id="adminReceipts" name="paymntTrnsctns">
> <div id="ExtractResults" style="width: 760px; background-color: #FFFFFF; border: 1px; padding: 1px; margin: 0px auto";>
> <table width="100%" border="1" cellpadding="0" cellspacing="0">
> <tr class="extractResultsTRHeading" bgcolor="#FFFFFF">
> <td class="extractResultsTD">
> <bean:message key="prompt.label.receiptNumber"/>
> </td>
> <td class="extractResultsTD">
> <bean:message key="prompt.label.dateTime"/>
> </td>
> </tr>
> <tr class="extractResultsTRHeading" bgcolor="<jsp:getProperty name="colour" property="next"/>">
> <td class="extractResultsTD">
> <bean:write name="adminReceipts" property="receiptNumber"/>
> </td>
> <td class="extractResultsTD">
> <bean:write name="adminReceipts" property="transactionDate"/>
> </td>
> </tr>
> </table>
> </div>
> <logic:iterate id="adminPaymentDetails" name="adminReceipts">
> </logic:iterate>
> </logic:iterate>
>
> Can anyone please tell me what I'm doing wrong.
>
> Thanks,
>
> Jackie.
>
> ---------------------------------------------------------------------
> 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 <mw...@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
Re: Logic Iterate - Cannot Create iterator for this collection
Posted by Michael McGrady <mi...@michaelmcgrady.com>.
I have not looked at this closely, but I notice there is no write in the
nested iterator. Can you say what happens with this when you run it?
At 01:06 AM 2/4/2004, you wrote:
>Hi All,
>
>I have a List collection (paymntTrnsctns) which contains an adminReceipts
>objects. One of the properties of adminReceipts is a list. So I display
>the normal string properties of the object, such as receiptNumber and
>transactionDate, but can't then get the list adminPaymentDetails within
>the adminReceipts object.
>
>I am trying to execute the following code:
>
> <logic:iterate id="adminReceipts" name="paymntTrnsctns">
> <div id="ExtractResults" style="width: 760px; background-color:
> #FFFFFF; border: 1px; padding: 1px; margin: 0px auto";>
> <table width="100%" border="1" cellpadding="0" cellspacing="0">
> <tr class="extractResultsTRHeading" bgcolor="#FFFFFF">
> <td class="extractResultsTD">
> <bean:message key="prompt.label.receiptNumber"/>
> </td>
> <td class="extractResultsTD">
> <bean:message key="prompt.label.dateTime"/>
> </td>
> </tr>
> <tr class="extractResultsTRHeading"
> bgcolor="<jsp:getProperty name="colour" property="next"/>">
> <td class="extractResultsTD">
> <bean:write name="adminReceipts"
> property="receiptNumber"/>
> </td>
> <td class="extractResultsTD">
> <bean:write name="adminReceipts"
> property="transactionDate"/>
> </td>
> </tr>
> </table>
> </div>
> <logic:iterate id="adminPaymentDetails" name="adminReceipts">
> </logic:iterate>
></logic:iterate>
>
>Can anyone please tell me what I'm doing wrong.
>
>Thanks,
>
>Jackie.
>
>---------------------------------------------------------------------
>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