You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Madhavi Ginjupalli <mg...@datalinx.net> on 2001/05/22 20:14:36 UTC
Session handling - setting layout templates on a session basis.
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:mginjupalli@datalinx.net]
Sent: Tuesday, May 22, 2001 9:54 AM
To: turbine-user@jakarta.apache.org
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: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org