What about:
<c:if test="${user.club.clubID==club.clubID}">SELECTED</c:if>>
Lemme know if it works, been having trouble getting drop-down lists working myself.
My issue is that the drop down list appears, and the correct value selected, but saving doesn't work.
Cheers
Aled
Fan wrote:
I have a dropdown with a list of club POJO:
<c:set var="clublist" value="${availableClubs}" scope="request"/>
<select name="user.club.clubID" id="user.club.clubID">
<c:if test="${clublist != null}">
<c:forEach var="club" items="${clublist}" varStatus="status">
<option value="<c:out value="${club.clubID}"/>"
//if club.clubID equals user.club.clubID then selected
>
<c:out value="${club.clubName}" escapeXml="false" />
</option>
</c:forEach>
</c:if>
</select>
My problem is , what's the syntaxfor checking if club.clubID equals
user.club.clubID then set the "selected"
for the option.
I have tried the following ways, but both also did not work,
<c:if test="${club.clubID.equals(${user.club.clubID})}">
<c:out value="selected" escapeXml="false" />
</c:if>
<c:if test="${club.clubID.equals(user.club.clubID)}">
<c:out value="selected" escapeXml="false" />
</c:if>
please give your valuable advice if you know the trick, thank you !!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]