> I have the following code:
> 
> <logic:iterate id="users" name="userInfo"> 
>       <bean:write name="users" property="userName"/> </logic:iterate>
> 
> How can i get the first record ?

JSTL makes this easy:

<c:out value="${userInfo[0].userName}" />

Or, to write out only the first one while iterating the loop:

<c:forEach items="${userInfo}" var="users" varStat="stat">
  <c:if test="${stat.first}">
     <c:out value="${users.userName}"/>
  </c:if>
...
</c:forEach>


--
Tim Slattery
[EMAIL PROTECTED]


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

Reply via email to