struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Grobmeier <>
Subject Re: Creating menu bar based on session information
Date Fri, 15 Apr 2011 13:13:22 GMT
> 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.

sounds good.

I actually have now that signature in an AbstractAction from which all
the other extend:

public boolean hasPrivileg(String role) { ... }

In my JSP:

<s:if test="hasPrivilege(\"user\")">Login</s:if>

I did not understand why you putted #user.roles in your example.

However, my debugger is never going int the hasPrivileg method. What
am I missing?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message