You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Leina Last <ey...@yahoo.com> on 2004/03/25 12:07:05 UTC
remove DefaultTop.vm & DefaultBottom.vm
Hi
I tried reading up but cannot find a solution.
In my ../layouts/Default.vm I have the following layout structure:
$navigation.setTemplate("/DefaultTop.vm")
$screen_placeholder
$navigation.setTemplate("/DefaultBottom.vm")
so for each vm screen the DefaultTop.vm & DefaultBottom.vm is loaded.
In my TurbineResources.properties I have "services.VelocityService.default.layout.template = /Default.vm" which I assume is used to display/load all the vm screens with above layout structure.
Question: How can I manage to ommit/remove DefaultTop.vm & DefaultBottom.vm for one specific vm screen (fullScreen.vm), so that it only display the $screen_placeholder part? Which file(s) do I need to edit.
Do I need to edit something in the TurbineResources.properties? Maybe a reference to find solution?
Thanks for helping
L
---------------------------------
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
RE: remove DefaultTop.vm & DefaultBottom.vm
Posted by Tim Colson <tc...@cisco.com>.
> I don't know Turbine, but assume it's using the
> VelocityLayoutServlet or a derivative,
I don't know Turbine well, but I do know that it is not using the
VelocityLayoutServlet in the "VelocityService", so unfortunately those
suggestions will most likely not work. :-(
The Turbine folks could answer this better, but I believe you'd need to
look inside your turbine action at rundata.setLayoutTemplate();
http://jakarta.apache.org/turbine/turbine-2.3/apidocs/org/apache/turbine
/util/RunData.html#setLayoutTemplate(java.lang.String)
setLayoutTemplate
public void setLayoutTemplate(java.lang.String layout)
Modifies the layout template for the screen. This convenience method
allows for a layout to be modified from within a template. For example;
$data.setLayoutTemplate("NewLayout.vm")
Parameters:
layout - a layout template.
Hope that helps.
Cheers,
Timo
> Leina Last wrote:
>
> > Hi
> >
> > I tried reading up but cannot find a solution.
> >
> > In my ../layouts/Default.vm I have the following layout structure:
> > $navigation.setTemplate("/DefaultTop.vm")
> > $screen_placeholder
> > $navigation.setTemplate("/DefaultBottom.vm")
> >
> > so for each vm screen the DefaultTop.vm & DefaultBottom.vm
> is loaded.
> >
> > In my TurbineResources.properties I have
> "services.VelocityService.default.layout.template =
> /Default.vm" which I assume is used to display/load all the
> vm screens with above layout structure.
> >
> >
> > Question: How can I manage to ommit/remove DefaultTop.vm &
> DefaultBottom.vm for one specific vm screen (fullScreen.vm),
> so that it only display the $screen_placeholder part? Which
> file(s) do I need to edit.
> >
> > Do I need to edit something in the
> TurbineResources.properties? Maybe a reference to find solution?
> >
> > Thanks for helping
> > L
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Finance Tax Center - File online. File on time.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: remove DefaultTop.vm & DefaultBottom.vm
Posted by Simon Christian <si...@stoutstick.com>.
I don't know Turbine, but assume it's using the VelocityLayoutServlet or
a derivative, which case you can specify that the template uses a
different layout in two ways, either by including it in the query
parameters (..&layout=MyOtherLayout.vm) or by specifying it directly
within your template, e.g.
#set( $layout = "MyOtherLayout.vm" )
See the manual page for a bit more info:
http://jakarta.apache.org/velocity/tools/view/layoutservlet.html
- simon
Leina Last wrote:
> Hi
>
> I tried reading up but cannot find a solution.
>
> In my ../layouts/Default.vm I have the following layout structure:
> $navigation.setTemplate("/DefaultTop.vm")
> $screen_placeholder
> $navigation.setTemplate("/DefaultBottom.vm")
>
> so for each vm screen the DefaultTop.vm & DefaultBottom.vm is loaded.
>
> In my TurbineResources.properties I have "services.VelocityService.default.layout.template = /Default.vm" which I assume is used to display/load all the vm screens with above layout structure.
>
>
> Question: How can I manage to ommit/remove DefaultTop.vm & DefaultBottom.vm for one specific vm screen (fullScreen.vm), so that it only display the $screen_placeholder part? Which file(s) do I need to edit.
>
> Do I need to edit something in the TurbineResources.properties? Maybe a reference to find solution?
>
> Thanks for helping
> L
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on time.
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: remove DefaultTop.vm & DefaultBottom.vm
Posted by Geir Magnusson Jr <ge...@4quarters.com>.
you would probably get your best answer from the turbine list...
On Mar 25, 2004, at 6:07 AM, Leina Last wrote:
> Hi
>
> I tried reading up but cannot find a solution.
>
> In my ../layouts/Default.vm I have the following layout structure:
> $navigation.setTemplate("/DefaultTop.vm")
> $screen_placeholder
> $navigation.setTemplate("/DefaultBottom.vm")
>
> so for each vm screen the DefaultTop.vm & DefaultBottom.vm is loaded.
>
> In my TurbineResources.properties I have
> "services.VelocityService.default.layout.template = /Default.vm" which
> I assume is used to display/load all the vm screens with above layout
> structure.
>
>
> Question: How can I manage to ommit/remove DefaultTop.vm &
> DefaultBottom.vm for one specific vm screen (fullScreen.vm), so that
> it only display the $screen_placeholder part? Which file(s) do I need
> to edit.
>
> Do I need to edit something in the TurbineResources.properties? Maybe
> a reference to find solution?
>
> Thanks for helping
> L
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on time.
>
--
Geir Magnusson Jr 203-247-1713(m)
geir@4quarters.com
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: Code generation suggestion?
Posted by Mike Kienenberger <mk...@alaska.net>.
Tim Colson <tc...@cisco.com> wrote:
> Say folks -
> I know a lot of you are doing java code generation using Velocity and
> the assorted tools, so I'm asking for advice.
>
> I'd have an ant-driven build step that inserts name/value pairs into a
> DB table using the SQL Task. I'd like to take that same data and also
> write it to java class file, driven by ant.
>
> Suggestions on what route to choose?
I guess it would depend on the incoming data format and what you wanted the
java source to look like.
For static data, probably one of the best tools for putting data into a
database or pulling data from a database is DBUnit's ant tasks.
If it's a trivial java class format, you might be just as well off writing
the ant task to directly create the java file rather than pushing it through
velocity as well.
The two following urls contain Cayenne's database -> java source ant tasks
if you're just looking for references.
http://cvs.sourceforge.net/viewcvs.py/cayenne/cayenne/src/cayenne/java/org/objectstyle/cayenne/gen/
http://cvs.sourceforge.net/viewcvs.py/cayenne/cayenne/src/cayenne/java/org/objectstyle/cayenne/tools/
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Code generation suggestion?
Posted by Tim Colson <tc...@cisco.com>.
Say folks -
I know a lot of you are doing java code generation using Velocity and
the assorted tools, so I'm asking for advice.
I'd have an ant-driven build step that inserts name/value pairs into a
DB table using the SQL Task. I'd like to take that same data and also
write it to java class file, driven by ant.
Suggestions on what route to choose?
Thanks,
Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org