I have a select box (actually several of them) as follows
<select name="beanFieldname">
<option selected value="<%=Bean.getField()%>"> <%(Bean.getDesc())%> </option>
<option value="1">Label 1</option>
<option value="2">Label 2</option>
<option value="3">Label 3</option>
</select>
As you can see above, when retrieving the selected value(Bean.getField), from the database, I am using a
java function(Bean.getDesc) to fetch the
corresponding label.
Is there a way by which once you have fetched the value from the database,
the label can be fetched directly (without a separate function?)
Thanks!