Hi friends,

Im my application, every logged user
belongs to a role(for example manager, worker etc).
The business logic is such that each role has a
predefined layout(which is available as a .vm file
in the layout directory). Once the user logs in,
i have to choose a template that fits his role
and as long as he stays in the session, the same
layout should be used for all the forthcoming screens.

Im finding that i will have to explicitely do a
data.setLayoutTemplate() in every screen. Is there anything
in the framework which allows me to set session wise
defaults (like layout templates, background color etc)?

Thanks in advance,
Madhavi



-----Original Message-----
From: Madhavi Ginjupalli [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 9:54 AM
To: [EMAIL PROTECTED]
Subject: How to change the layout template per user basis??


Hi,

i'm using this in the doBuildTemplate(RunData data, Context context )
method of Index.java to change the layout template for 'test' user.
But it works only for the Index.vm ,for other templates the layout
goes back to the one specified in the TurbineResources.properties.

        if(user.getUserName().equalsIgnoreCase("test"))
                data.setLayoutTemplate("/DefaultTest.vm");

Any idea how to do this??

Thanks,
Madhavi




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

Reply via email to