Ok. It's working and it IS a pattern similar to JavaBeans based on name,
screen vs. layout.
The problem was that I had the "Administration.vm" screen in a subdirectory
of the "screens" directory. Once I pulled it out into the "flat" screens
directory it pulls the layout "with the same name" correctly.
That's great default behavior.
Jason, what section of code should I look at to think about making choice of
layout a little more explicit?
Joet
===============================================
----- Original Message -----
From: "Joe Terry" <[EMAIL PROTECTED]>
To: "Turbine Users List" <[EMAIL PROTECTED]>
Sent: Thursday, November 01, 2001 9:36 AM
Subject: Re: Multiple Layouts for Log-In, special sections, and then
ofcourse the "default"...
> Jason,
>
> I have the "newapp" application running and the "Login.vm" template and
> "Login.vm" layout are a part of that example. ... but ...
>
> How do I activate another layout for another template?
>
> Is it a pattern by name?
>
> I have a screen in a subdirectory of the "screens" directory and I want it
> to have a different layout. Where do I specify this?
>
> A) TurbineResources.properties by installing a subclass of
> "VelocityNavigation.java" such as ...
>
> services.VelocityService.default.navigation=JoesVelocityNavigation
>
> B) In the screen itself?
>
> Administration.java
> ...
> import org.apache.turbine.services.logging.TurbineLogging;
> ...
> protected boolean isAuthorized( RunData data ) throws Exception
> {
> boolean isAuthorized = false;
>
> AccessControlList acl = data.getACL();
>
> if (acl == null )
> {
> data.setScreenTemplate(
> TurbineResources.getString("template.login"));
>
> isAuthorized = false;
> }
> else if(acl.hasRole("turbine_root"))
> {
> isAuthorized = true;
> }
> else if(acl.hasRole("turbine_admin"))
> {
> isAuthorized = true;
> }
>
> TurbineLogging.info("\nisAuthorized = "+isAuthorized+"\n", data);
>
> if ( isAuthorized == true )
> {
> data.setScreenTemplate(
> TurbineResources.getString("template.admin_layout"));
> }
>
> return isAuthorized;
> }
>
> ====================================================
>
> Also, Jason ....
>
> The line ....
>
> TurbineLogging.info("\nisAuthorized = "+isAuthorized+"\n", data);
>
> dosen't seem to be outputting anything to Turbine.log ... Other messages
are
> going in the log, but not mine?
>
> What else should I look at?
>
> =============================
>
> Joet
> Software Sculptor
>
> =============================
>
>
> ----- Original Message -----
> From: "Jason van Zyl" <[EMAIL PROTECTED]>
> To: "Turbine Users List" <[EMAIL PROTECTED]>
> Sent: Wednesday, October 31, 2001 9:13 PM
> Subject: Re: Multiple Layouts for Log-In, special sections, and then
> ofcourse the "default"...
>
>
> > On 10/31/01 11:03 PM, "Joe Terry" <[EMAIL PROTECTED]> wrote:
> >
> > > Anyone have an example of subclassing "VelocityNavigation".
> > >
> > > I need to have a layout for Log-In that is different from the layout
for
> > > another section of the application, that is completely different from
> the
> > > "Default" layout.
> >
> > If you have a screen template named Login.vm than make a corresponding
> > layout template called Login.vm and the two will be used together.
> >
> > > I have built the Javadocs, I have the source. 2.2b1
> > >
> > > I'm not happy with the documentation, but Turbine rocks ... If only, I
> can
> > > meet my deadlines ...
> > >
> > > Cheers!
> > >
> > > Joet
> > >
> >
> > --
> >
> > jvz.
> >
> > Jason van Zyl
> >
> > http://tambora.zenplex.org
> > http://jakarta.apache.org/turbine
> > http://jakarta.apache.org/velocity
> > http://jakarta.apache.org/alexandria
> > http://jakarta.apache.org/commons
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>