Pull tools are automatically added to your template's context by turbine.
They allow you to do things without calling a specific action or what not.
The can be anything from simple utilities (like your number formatter) to a
tool that allows you to directly access information in a database.  A pull
tool can pretty be anything you want or need it to be.

Article on "pull"
http://jakarta.apache.org/turbine/turbine-2/pullmodel.html

Interface your tool needs to implement:
org.apache.turbine.services.pull.ApplicationTool

Some source classes to look at:

org.apache.turbine.modules.pages.TemplatePage
org.apache.turbine.util.template.TemplateLink
org.apache.turbine.services.pull.util.UIManager


also look in turbine.properties file under the "P U L L  S E R V I C E"
section on how to implement your tool once you have written it.

Scott



-----Original Message-----
From: Scott Merritt [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 16, 2001 2:14 PM
To: 'Turbine Users List'
Subject: RE: Formatting Numeric Values using Velocity


What exactly do you mean when you say "pull tool."  Is that something like a
method in your screen class that does the work for you?

-----Original Message-----
From: Weaver, Scott [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 16, 2001 6:45 AM
To: 'Turbine Users List'
Subject: RE: Formatting Numeric Values using Velocity


You could write a pull tool that does number formatting.

Scott

-----Original Message-----
From: Dave Everson [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 16, 2001 9:35 AM
To: Turbine Users List
Subject: Formatting Numeric Values using Velocity


Hi - 

Is there a way of formatting numeric values within Velocity?  Ideally, I
would like printf type of functionality where you provide a mask (e.g.
###,###,###.00) and the numeric value is reformatted using that mask.

Is there something in Velocity that does this?  If not, how does one go
about creating macros (?) to implement this type of functionality?

Thanks,
Dave

--
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]>

Reply via email to