There are (at least) two phases to populating the Context for rendering 
on the template:

1) When submitting a form, make sure that the action says something like 
action="$link.setPage("ViewResults.vm").setAction("SubmitQuery")"  When 
you do this, the appropriate doWhatever(RunData, Context) method in 
SubmitQuery.class will be called, and you can put stuff into the context 
there.
2) Furthermore, when ViewResults.vm is rendered, it will search for a 
ViewResults class with a doBuildTemplate(RunData, Context) method that 
can also be used for populating the Context which is what the template 
will use to populate itself.

Although my examples here used Velocity, I'm sure it works similarly in JSP.

Will Stranathan

ingo schuster wrote:

> Hi,
> 
> I'm slightly confused about how the templating in turbine is supposed to 
> be used.
> Speaking in M-V-C, I assumed that the screen templates would be the 
> view, just displaying the results of the processing that the controller 
> (turbine, action) has done.
> But if I use that approach (action does the processing, provides the 
> screen with the results, and the screen is simply a template file, in my 
> case a jsp), won't then the DefaultPage attempt to load the screen.class 
> in order to ask it for the layout? If my screen is only of a template 
> file, there is no class to instantiate!
> So, do I have to override the doBuild in my JspPage?
> 
> ingo.
> 
> 
> 
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to