Hi, i have been using struts equal tag to check if a variable is equal to a specific value. What if i want to check a session variable contains a value 4,5,6,7. Right now in logic:Equal i can check only for one value. is there a possibility for checking equal to for multiple values. Thanks
this is one of the many reasons why i (and many others) moved to JSTL instead of struts-logic and struts-bean libraries. you can try the logic:match tag to do substring matching, but it's not the cleanest/safest approach. one other alternative is to extend the logic:equal tag and do your own custom tag. [ May 12, 2005: Message edited by: alan do ]
-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
if you have a few values, you can do this... <c:if test="${theValue == '4' || theValue == '5' || theValue == '6' || theValue == '7'}"> do this... </c:if>
or you can do range <c:if test="${theValue >= 4 && theValue <= 7}"> do that </c:if> [ May 14, 2005: Message edited by: alan do ]
-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>