Paul Smith <[EMAIL PROTECTED]> writes:

>2nd Question: I would think so, but don't quote me on that... ;)  You can
>also get access to the Context object in the isAuthorized(RunData) method by
>doing the following sneaky trick:

Please don't. 

If you have the foo.vm template, you can back it with a java class
called "screen.Foo" on your module search path.

So if you have 

modules.packages = org.apache.turbine.modules, com.foo.modules

you can write a

--- cut ---
package com.foo.modules.screen.Foo;


public class Foo extends VelocityScreen
{
 public void doBuildTemplate(RunData data,
                                   Context context)
 {
   context.put("mystuff", new MyCoolObject());
 }
}
--- cut ---

and whenever you reference the "Foo.vm" template, the doBuildTemplate()
method is called right before your screen is rendered and you find
a MyCoolObject object in the Context available as $mystuff.

Same should be possible for navigation and layout templates. If it is
not, please open a bug and it will be possible very soon (I'll
personally put it in). 

Don't start hacking on isAuthorized. Please. :-) It's not intended for
this.

        Regards
                Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     [EMAIL PROTECTED]

Am Schwabachgrund 22  Fon.: 09131 / 50654-0   [EMAIL PROTECTED]
D-91054 Buckenhof     Fax.: 09131 / 50654-20   

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to