<select id="ordersSelect" class="drop-down" onchange="somemethod()">
<c:forEach items="${orders}" var="order" varStatus="orderStatus">
<option value="${order.id}"> ${order.publicId} </option>
</c:forEach>
</select>
I have the above peice of code in a JSP page, that receives a list of Orders and each order has some information, the particular information that I want to display in a SELECT field is the publicId.
The problem is that, on display there is only one OPTION in the SELECT and the rest of the order's publicId s are displayed as normal text below the SELECT box and not an OPTION to select.
I found out that the publicId actually contains a String like A10/0001/0 and that is the character "/" is most probably causing the problem.
Any solutions/suggestion/ideas?