This would be done using turbines pull service.

In your.package.tools you might have a class called something like 
'lotsOfCoolStuffTool'... which Implements 'ApplicationTool' and 'Recyclable'.

This tool would be put into contex from the TR.prefs file with a line like 
this:

tool.request.cool=your.package.tools.lotsOfCoolStuffTool

the documentation for how this works is in the default TR.prefs file... but 
basically 'request' is the scope, 'cool' is the context and 
'your.package.tools.lotsOfCoolStuffTool' is your pull tool.

In your code you would access the class via $cool.

Editing the TR.prefs file you will also notice 'tool.request.link' and 
'tool.request.page'. I have sure you have used $link and $page in your code 
somewhere. Those classes are just pull tools.

>From there its as simple as adding new methods to your new class and letting 
your template designers know about them.

For example... I have a pull tool specific to a set of forms. The template 
pulls the data from the tool to fill out the form. That or the tool gives 
blank data if the form should be blank. The submit is sent to an action which 
verifies the data. On an error, the action dumps the user back to the form 
(in which case when the template pulls data from the tool, the tool see's 
this and gives the data the user was editing instead of pulling data from the 
db.) Other wise the action finishes up processing the data and the user moves 
on to the next form.

Anyways... That should get you started. Sorry for the poor explenation I just 
woke up :)

Luke

On Monday 21 January 2002 09:48 am, you wrote:
> Hi,
>
> As a new Turbine user, I read Jon Steven's article on the Pull MVC model.
> Makes a lot of sense to me (this is how I've been working with Velocity for
> the last 6 months).
>
> http://jakarta.apache.org/turbine/turbine-2/pullmodel.html
>
> But Turbine's default implementation appears to be a Push model, where
> every Velocity page requires a Java class.    However, I'd like to enable
> my template designers to add new navigational links without requiring the
> programmer to write a new Java class.
>
> Is there a built-in structure that enables this, or do I implement my own
> additional framework?  I searched the docs, but didn't see an obvious
> recommended solution.  What's the "Best Practice" here?
>
> Thanks,
>
> WILL
> _______________________________________
> Forio Business Simulations
> Will Glass-Husain
> (415) 440-7500 phone
> (415) 235-4293 mobile
>
> [EMAIL PROTECTED]
> www.forio.com

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

Reply via email to