wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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.
 
 
subject: Struts 2.0 migration logic:present tag
 
Similar Threads
When to use logic:present tag
logic:present tag with roles
Validate if a field is present
How to nest tags?
populating jsp page dynamically using form beans