Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2.0 migration logic:present tag

 
Didier Varon
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am migrating a struts 1.3 application and I haven't found how to migrate the <logic resent role="someRole">
<!-- some html code for someRole users-->
</logic resent>

Does anyone know how's it done?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<s:if...>
 
Didier Varon
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you David,

But if I have more than one role do I have to iterate over the roles collection on the Principal object?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That, or create an accessor so you can determine if a specific role is present in a single call.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic