You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Slattery, Tim - BLS" <Sl...@bls.gov> on 2004/02/27 22:36:22 UTC
RE: ???
> Anybody knows how can I define a script variable with bean
> define tag or another, for the first element of a collection???
>
> for example:
>
> <%
> ArrayList users = (ArrayList)pageContext.getAttribute("users");
> User user = users.get(0);
> %>
<c:set target="user" value="${users[0]}"/>
Not sure exactly how "pageContext" translates, but I think this will do it.
--
Tim Slattery
Slattery_T@bls.gov
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org