File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use <s:if> tag in another Struts2 tag

 
Vamshi Jampala
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know may be a stupid question but still, can we use s:if tag in another struts2 tag ?

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No; that's malformed JSP.

You can either inline an OGNL expression in the "value" attribute, set a value and use it, or do things like that in the action and expose only a properly-filled action property (preferred).
 
Vamshi Jampala
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know how to do it in action class, could you please explain me as in how to do it in OGNL.Thanks for your time David
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use OGNL's ternary expression.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic