This is how I'd do it using JSTL: <c:set var="prevName" scope="request" value=""/> <c:forEach var="person" items="personlist"> <c:if test="${person.name != prevName}"> <c:out value="${person.name}"/> </c:if> <c:set target="${prevName}" value="${person.name}"/> </c:forEach>
Hope this helps. -Sasha On 8/20/03 6:53, "Terje Hopsų" <[EMAIL PROTECTED]> wrote: > Hello, > > I have a <logic:iterate> loop listing out a lists of name++. For each line > the name is written but I want to write it only when I get a different name > than previous line. I want to do it like this: > > <c:set prevName = "" scope="request" value=""/> > <logic:iterate id="person" name="personlist" type="Person"> > ?? Compare prevName to name > <bean:write name="id" property="name"/> > ?? somehow update prevName > </logic:iterate> > > I have tried but could not figure out how to do it. > Is this possible? > > - Terje > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]