cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Johnston <coc...@lojjic.net>
Subject Re: forEach confusion
Date Sat, 22 Jul 2006 23:19:44 GMT
Andrew wrote:
> Hi,
> i'm trying to do this:
> 
>    for int (i=0; i < paypalResponse.getErrors().length; i++) {
>      String message= paypalResponse.getErrors(i);
>    }

Does that really work?  I'm guessing that paypalResponse is a 
com.paypal.soap.api.AbstractResponseType ... if that's right then the 
online javadocs say getErrors(int i) does not return a String, it 
returns an ErrorType object.

> 
> like so in jx
> 
>         <jx:forEach var="item" items="${ paypalResponse.getErrors()}">
>         <tr>
>             <td>${item}</td>
>         </tr>       
>         </jx:forEach>
> 
> but this only returns an object and not the object value. What am I 
> missing? I tried ${item[0]} but that returns nothing.

I assume by "the object value" you mean a String representation of it? 
Try ${item.toString()} ?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message