I would have liked to style a drop down box, and therefore have a class or ID on the various options. In plain html, it is just to put this on, but how to do this in a jsp tag file?
I paste the code for my roof file in here:
Code:
<c:forEach items="${models}" var="x">
<c:choose>
<c:when test="${x.disabled}">
<form:option value="${x.id}" disabled="true">
<spring:message code="${x.id}" text="${x.name}" />
</ form: option>
</ c: when>
<c:otherwise>
<form:option value="${x.id}">
<spring:message code="${x.id}" text="${x.name}" /> </ form: option>
</ c: otherwise>
</ c: choose>
</ c: foreach>
I put a class or ID on one of the optional elements, then this error:
Attribute class invalid for tag option according to TLD
Is there a way you can get around this? Since I am reasonably new in jsp I tried to write a simple select (drop down box) in pure html into the code, but then leaves it to not come up with when I submitt form.
Bookmarks