aspose file tools*
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
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 !!!
 
Consider Paul's rocket mass heater.
 
subject: Struts2 -displaytag | <S:if> tag is not working in display tag