You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Gidley Ben, Slough" <Be...@aniteps.com> on 2002/07/03 18:34:32 UTC

Velocity Layouts

I am trying to get TDK 2.1 to use two different velocity layout models in
one application. 

We have one section of the site using frames and have followed the Velocity
Site howto and set
>	services.VelocityService.default.layout = VelocityOnlyLayout

In TurbineResources.properties. This works fine. However is disables $page. 

In another section of the site we do not use frames and need to use $page.
So want
>	services.VelocityService.default.layout = VelocityECSLayout
However there does not seem to be a way of setting this for just one screen.

I have tried setting it directly using data.setLayout() but it does not seem
to work.

Anyone have any ideas

Thanks

Ben Gidley

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Velocity Layouts

Posted by Rodney Schneider <rl...@arcalink.com>.
On Thu, 4 Jul 2002 02:34, you wrote:

> I am trying to get TDK 2.1 to use two different velocity layout models in
> one application.
>
> We have one section of the site using frames and have followed the Velocity
> Site howto and set
>
> >	services.VelocityService.default.layout = VelocityOnlyLayout
>
> In TurbineResources.properties. This works fine. However is disables $page.
>
> In another section of the site we do not use frames and need to use $page.
> So want
>
> >	services.VelocityService.default.layout = VelocityECSLayout
>
> However there does not seem to be a way of setting this for just one
> screen.
>
> I have tried setting it directly using data.setLayout() but it does not
> seem to work.

Hi Ben,

Sorry for the late reply...  you can do this by overriding the method 
Screen.getLayout(RunData) in your screen class.  Return the name of the 
Layout class you want to use for that particular screen (ie: 
VelocityECSLayout).

Let me know if you have any problems.

Regards,

-- Rodney

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>