This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts2 -displaytag | <S:if> tag is not working in display tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 -displaytag | <S:if> tag is not working in display tag" Watch "Struts2 -displaytag | <S:if> tag is not working in display tag" New topic
Author

Struts2 -displaytag | <S:if> tag is not working in display tag

Urmi Garad
Greenhorn

Joined: Jun 20, 2012
Posts: 3
I am using display tag with struts2 for pagination in my project. I want to display table for specific type and my arraylist contains different product types like stationary, grossary, bakery and other. I want to display table for grossary and bakery products. I used "s:if" struts2 tag but it is not working. The result is it display all the product list. Please suggest me how to use condition statements in display tag. My jsp code is like -

Urmi Garad
Greenhorn

Joined: Jun 20, 2012
Posts: 3

Struts2 tag could not work inside the display tag. I resolved this problem by creating two lists in action class with the help of if else condition. Then I used these list to display two different tables using display tag.

Happy Coding !!!
 
jQuery in Action, 2nd edition
 
subject: Struts2 -displaytag | <S:if> tag is not working in display tag
 
Similar Threads
Struts2
struts2 + display tags + maps
Struts2 + display tag
DisplayTag Export Question?
JSTL paging error