You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jack Axaopoulos <ja...@cisco.com> on 2002/01/03 23:36:05 UTC

Some newbie Turbine questions

I'm currently learning to use Turbine & Velocity, and have
a fewof questions.

What is the easiest way to get your application
	to serve up a default page, layout, navigation and screen as
	the starting point to your web app?
	Suppose your URL looks like this <non-tomcat servlet engine path 
stuff>/turbine

	What I did to accomplish this is to set the following in my
	turbine properties file:

page.default = CCFDefaultPage
services.VelocityService.default.page = VelocityPage
services.VelocityService.default.layout = VelocityOnlyLayout
services.VelocityService.default.navigation=VelocityNavigation
services.VelocityService.default.error.screen = VelocityErrorScreen

services.VelocityService.default.layout.template = /CCFSampleLayout.vm


In the Class CCFDefaultPage I coded the following:
------------------------------------------------------------------------------------------------
public void doBuild(org.apache.turbine.util.RunData data) throws Exception {

   data.setScreen("CCFDefaultScreen");
   data.setLayout("VelocityOnlyLayout");

     super.doBuild(data);
}

------------------------------------------------------------------------------------------------

This setup works for getting the layout, navigation and screen shown
as the initial page which I want.
But I SUSPECT there is a much easier way to do this.

Is there anyway I can set a default template .vm file to show up
without having to write the CCFDefaultPage class which explicitly
calls setScreen()  ???

Also...if I don't execute "data.setLayout("VelocityOnlyLayout");" in the 
doBuild method
I get built in DefaultTopNavigation and DefaultBottomNavigation classes
executing instead of the CCFSampleLayout.vm.
template being used.   Is this right?


Thanks...

More questions later.

J


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


More info - Re: Some newbie Turbine questions

Posted by Jack Axaopoulos <ja...@cisco.com>.
So as not to confuse you anymore...

I'm also using my own session validator which
doesnt require any kind of login.

public boolean requiresNewSession(org.apache.turbine.util.RunData data) {
	return false;
}

Thanks...

J


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