In Turbine 3, we have a simple method which return a tool:
public static ApplicationTool getTool(TemplateContext context,
String name)
This function is in the class org.apache.turbine.modules.Module. Every
action and
screen extend this class so the tools are available everywhere in your
application.
I don't think you have the equivalent in Turbine 2, but , if you want
to implement it
yourself, the function is pretty straightforward :
public static ApplicationTool getTool(TemplateContext context,
String name)
{
try
{
return (ApplicationTool) context.get(name);
}
catch (Exception e)
{
return null;
}
}
David Worms
On Thursday, October 10, 2002, at 05:42 AM, Marc Lustig wrote:
> Hi,
> is there any particular way how to access a reference to a tool from
> within
> action-code?
> Or is it necessary to create a new object?
>
> TIA.
> Marc
>
>
> --
> 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]>