You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Mike Haberman <mi...@ncsa.uiuc.edu> on 2001/07/20 16:53:44 UTC

[3.0] screen module being run twice

The pipeline is executing the screen module twice.  Once
in the execute() phase and again via the call to the
renderer in the layout template:

...
<table width="100%">
<tr>
<td>$renderer.render("screens", $data, $template)</td>
</table>
...

If we indeed want the screen to execute before any rendering is
done, then perhaps we should have a renderOnly() method in the
renderer.

Also, since the rendering of the screen may influence/affect some
of the html tags (e.g title), perhaps we should either

   1.  call the renderer first thing in the layout template:
   (#set $body = $renderer.renderOnly("screens", $data, $template))
   
   2.  put screen_placeholder in the context like we did in
       2.1 with the output of renderer.



Let me know how you want to handle this.

mike

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: [3.0] screen module being run twice

Posted by Jason van Zyl <jv...@apache.org>.
On 7/20/01 10:53 AM, "Mike Haberman" <mi...@ncsa.uiuc.edu> wrote:

> 
> The pipeline is executing the screen module twice.  Once
> in the execute() phase and again via the call to the
> renderer in the layout template:
> 
> ...
> <table width="100%">
> <tr>
> <td>$renderer.render("screens", $data, $template)</td>
> </table>
> ...
> 
> If we indeed want the screen to execute before any rendering is
> done, then perhaps we should have a renderOnly() method in the
> renderer.
> 
> Also, since the rendering of the screen may influence/affect some
> of the html tags (e.g title), perhaps we should either
> 
>  1.  call the renderer first thing in the layout template:
>  (#set $body = $renderer.renderOnly("screens", $data, $template))
>  
>  2.  put screen_placeholder in the context like we did in
>      2.1 with the output of renderer.
> 
> 
> 
> Let me know how you want to handle this.

Also, which I didn't mention previously, when this is finally setup
you'll be able to do whatever you want. I don't like #1 or #2 myself
but nothing will prevent you from doing anything you want.
 
> mike
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org

-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: [3.0] screen module being run twice

Posted by Jason van Zyl <jv...@apache.org>.
On 7/20/01 10:53 AM, "Mike Haberman" <mi...@ncsa.uiuc.edu> wrote:

> 
> The pipeline is executing the screen module twice.  Once
> in the execute() phase and again via the call to the
> renderer in the layout template:
> 
> ...
> <table width="100%">
> <tr>
> <td>$renderer.render("screens", $data, $template)</td>
> </table>
> ...
> 
> If we indeed want the screen to execute before any rendering is
> done, then perhaps we should have a renderOnly() method in the
> renderer.

The module that corresponds to the target template is executed once
to allow it to change the value of the target template before rendering
actually occurs. This happens during the login process when the initial
target is, say, Index.vm, and the user isn't logged in. The execution
of the module will change the target to Login.vm and that is the
template that is rendered. This is documented in ClassicPipeline,
read the source.
 
> Also, since the rendering of the screen may influence/affect some
> of the html tags (e.g title), perhaps we should either
> 
>  1.  call the renderer first thing in the layout template:
>  (#set $body = $renderer.renderOnly("screens", $data, $template))
>
>  2.  put screen_placeholder in the context like we did in
>      2.1 with the output of renderer.
> 
> Let me know how you want to handle this.

Again, unfortunately, I have little or no idea what you're talking
about. Maybe you can provide some clearer examples. I don't see how
#1 or #2 are beneficial in any way.
 
> mike
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org

-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org