[EMAIL PROTECTED] writes:

>--part1_d3.19abe56f.2b9e62d6_boundary
>Content-Type: text/plain; charset="US-ASCII"
>Content-Transfer-Encoding: 7bit

>How do I dynamically change the layout template in Turbine according to the 
>current user role in a servlet session?

>My use case is:
>       Two workers share the same set of screens, but one of them
>       has the additional role of "admin" and needs additional menu
>       buttons to access additional screens. My plan is to have two layout 
>       templates and dynamically set the layout template depending on
>       the user's role.

>My problem is:
>       I was able to set the layout template from my "LoginUser.java" by
>       calling "data.setLayoutTemplate()". However, every time I call 
>       "data.setScreenTemplate()", the layout template got reset back to 
>       the default one.

much easier: Use a navigation template which checks an user role by

#if ($user.getAcl().hasPermission())
  ... admin menu ...
#end

I'd still consider the back changing of the layout a bug. Can you send
me a small code snippet so I can check?

        Regards
                Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
[EMAIL PROTECTED]        +49 9131 50 654 0   http://www.intermeta.de/

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to