This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 2.0 migration  logic:present  tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2.0 migration  logic:present  tag" Watch "Struts 2.0 migration  logic:present  tag" New topic
Author

Struts 2.0 migration logic:present tag

Didier Varon
Greenhorn

Joined: Jul 14, 2005
Posts: 23
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

Joined: Sep 29, 2008
Posts: 12617

<s:if...>
Didier Varon
Greenhorn

Joined: Jul 14, 2005
Posts: 23
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

Joined: Sep 29, 2008
Posts: 12617

That, or create an accessor so you can determine if a specific role is present in a single call.
 
Consider Paul's rocket mass heater.
 
subject: Struts 2.0 migration logic:present tag