You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by me...@bpam.fr on 2002/11/06 08:07:26 UTC

Réf. : Newbie logic:iterator question





"Oliver Meyn" <ol...@mineallmeyn.com> on 05/11/2002 21:04:17

Veuillez répondre à "Struts Users Mailing List" <st...@jakarta.apache.org>

Pour :    "STRUTS" <st...@jakarta.apache.org>
cc :
Objet :   Newbie logic:iterator question

I have the same problem with the logic iterate tag.
So I'm still using the good old loop "for" instead of iterate tag.
This thread existed a few weeks ago, according to the archives, where I
found this suggested example for how to get iterator working (from Alexis
Gallagher):

<jsp:useBean id="userListHelper" scope="request"
class="com.tpc.UserListHelper" />

<logic:iterate id="item" name="userListHelper" property="userList"
indexId="index">
 <bean:write name="item" property="username"/>
</logic:iterate>

which appears to be the same idea as used in the struts-example, but I can't
get this to work, as it fails with the error:

Cannot find bean item in scope null

Similar attempts with my own beans also fail (as does explicitly setting the
scope, where the error just becomes "... item in scope application" or
whatever scope is specified).

Any suggestions?

Thanks very much,
Oliver


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>








--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>