| Author |
How to check value in list using s:if
|
shwetank sharma
Greenhorn
Joined: Jan 09, 2011
Posts: 10
|
|
Hi All,
I have set an arraylist in session
Now i want to check for some value in that list and then only display the link.
The approach which is working is to iterate the list in session and check for that value
for eg,
but i need to check value and show link many a times so iterating everytime over same object doesn't looks good...moreover i also cannot use many time <s:if> for each check within iterator due to design constraint..
what i was looking was something like if i can directly use if without iterator
but this approach isn't working...
Looking forward for your inputs..
Thanks in advance..
Cheers,
Shwetank
|
~~Cheers~~
Shwetank
|
 |
Joe Ess
Bartender
Joined: Oct 29, 2001
Posts: 8291
|
|
|
OGNL never clicked with me, so whenever I find myself with a complex condition that I'd like to use in an if tag, I make the condition a property of the action. Then the OGNL for the if tag is simple and I can evaluate the condition in easy-to-understand Java.
|
"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
|
 |
 |
|
|
subject: How to check value in list using s:if
|
|
|