In pull tools, I'm particularly biased to the RunDataApplicationTool
interface - extend that and there's a method included in the interface that
sends a RunData object at every request.

In the action and screens interfaces it passes the rundata for every
overloaded method I believe.

Hope that helps,

Bradford A. Folkens
[EMAIL PROTECTED]
 

-----Original Message-----
From: Gerry Duprey [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 20, 2004 11:59 AM
To: Turbine Users List
Subject: Re: Getting the name of the current template file

Howdy,

That seems to work well (the $data... ref in the template proper).

Is there a reasonably easy way to get the current RunData object for a
session when it hasn't been passed to you (like in a pull tool)?

Thanks!

Gerry

Folkens, Brad wrote:
> Try (in the template)
> #set($currentScreen = $data.getTemplateInfo().getScreenTemplate())
> Or in the source
> data.getTemplateInfo().getScreenTemplate()
> 
> Bradford A. Folkens
> [EMAIL PROTECTED]
>  
> 
> -----Original Message-----
> From: Gerry Duprey [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 20, 2004 9:09 AM
> To: [EMAIL PROTECTED]
> Subject: Getting the name of the current template file
> 
> Howdy,
> 
> Is there a way to get the name of the current template file being 
> processed by Turbine?
> 
> For example, say you have a pull tool that manages info about a form.  
> In the top of the velocity screen template, you define the form via 
> your pull tool.
> 
> You want the pull tool to be able to figure out what the name of that 
> screen template file/path being processed is so it can be stored and 
> reused later (say, for re-presenting the page after submission if it had
errors).
> 
> The form handling pull tool has a means to keep the name of that 
> template (lets just say the screen template) between requests for a 
> given session, but I haven't found a way to extract that actual screen 
> template name so I can store it for later reuse.
> 
> The idea is that once a form is first setup, it may need to be 
> redisplayed over and over (while a user corrects problems and 
> resubmits).  Right now, I have a line in the form that sets the name of
the template into the form.
> This seems a bit redundant (a template that has, inside itself, the 
> name of
> itself) and error prone (future renaming attempts)
> 
> Appreciate any thoughts on this :-)
> 
> Gerry
> 
> --
> Gerry Duprey
> ________________________________________
> SchoolsOPEN, LLC
> 123 North Ashley, Suite 120
> Ann Arbor, MI 48104
> Phone (877) 483-1944 Ext. 401
> Fax (734) 661-0819
> 
> Visit us Online at www.Schools-OPEN.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

--
Gerry Duprey
________________________________________
SchoolsOPEN, LLC
123 North Ashley, Suite 120
Ann Arbor, MI 48104
Phone (877) 483-1944 Ext. 401
Fax (734) 661-0819

Visit us Online at www.Schools-OPEN.com

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

Reply via email to