I need to access only the first object in this Array. Any ideas?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 05, 2004 5:19 PM
To: [EMAIL PROTECTED]
Subject: Iterate tag issue with an array


I have a DTO that may contain a Guarantor[].

Here is my code that keeps giving me an "null 
java.lang.ArrayIndexOutOfBoundsException" when I do not have a Guarantor[0]

<logic:present name="creditApplicationDto" property="guarantors">
                            <logic:notEmpty name="creditApplicationDto" 
property="guarantors">
                                <bean:write name="creditApplicationDto" 
property="guarantors[0].firstName"/>&nbsp;
                                <!--< bean:write name="creditApplicationDto" 
property="guarantors[0].lastName"/>-->
                            </logic:notEmpty>
                            <logic:empty name="creditApplicationDto" 
property="guarantors">No Guarantors&nbsp;</logic:empty>
                        </logic:present>



What am I doing wrong to check for the existance of 1 or more Guarantors in this array?

---
> Thanks...
> Mick Knutson
> 
> 525 Market Street, SF, CA  94103
> (415) 222-1020
> [EMAIL PROTECTED]
> MAC A0103-223
---



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to