you could do something like this:
<s:if test="hasPrivilege(#user.roles)">...</s:if> where (bool) hasPrivilege(List<Roles>,...) is a function in your action.

Markus

Am 15.04.2011 13:57, schrieb Christian Grobmeier:
Hi all,

this is probably a trivial question, but I am unsure how to solve it best.

I have an object User user. It has the properties name, password and
List<Roles>  roles.

Now I would like to create a navigation bar in my struts 2.2.1 jsp pages.

I wanted to avoid huge chunks of logic in my code. Therefore java code
in my templates should be avoided.

I have thought if the if/else struts tag would help me. But can I
access a list and look if a specific role is there?

How do others do that?

Thanks in advance,
Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to