Abdullah Jibaly wrote:
Hi all,
Has anyone come across a good way to solve this issue using jstl? I want a
clean way to map values and being able to define it within the jsp page. for
example, if a bean property has a value of true, I want to get the output as
'Yes'.
<c:out value="${isEnabled}" /> -> outputs true or false
I know you can use a map, but is there a way to cleanly define it in the jsp
page? If not what is the recommended way of doing it?
<c:out value="${yesNoMap[isEnabled]}" /> -> outputs yes or no
Thanks in advance,
Abdullah
A straightforward approach would be ...
<c:if test="${enabled}">Yes</c:if>
<c:if test="${not enabled}">No</c:if>
-Bill Siggelkow
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]