Logic iterate can be used only over a collection of elements.
Check whether the property userRoles in the bean returned by
LookUpConstants.SESSION_OBJECT is a collection.
Also the property names used in bean:write(role) is different from the
property name used in logic:iterate(userRoles) which I feel has some
mismatch.
hope this info helps.....
On 5/11/06, josh t <[EMAIL PROTECTED]> wrote:
Greetings everyone:
Objective: Retrieve an object from the session that contains a
Collection of String for userRoles. Iterate through userRoles, and if one
of the roles equals "SUPER" include a href.
So this is what I have, but doesn't seem to be correct:
............................................................
<logic:iterate id="role"
name="<%=LookupConstants.SESSION_OBJECT%>"
property="userRoles" scope="session">
<logic:equal name="role" property="SUPER">
<a href="test.do" class="BodyLink"><b>test</b></a><br />
</logic:equal>
</logic:iterate>
.............................
Note: I can get the session value just fine, when i do the following:
<bean:write name="<%=LookupConstants.SESSION_OBJECT%>" property="role"
scope="session" />
Can you please let me know what I'm doing wrong within the iterte block?
---------------------------------
Get amazing travel prices for air and hotel in one click on Yahoo!
FareChase