Hello,

Unfortunately this solution doesn't solve the complete problem for us (as
detailed below), I'm open to suggestions on how else to pass parameters to
arbitrary contributed blocks. Putting the relevant information in the
Environment is (was?) an elegant solution for this.


Howard Lewis Ship wrote
> 
> Perhaps you could return a Block containing:
> 
> <t:block id="renderWithEnvironment">
>   <t:trigger event="setupEnvironment"/>
>   <t:delegate to="blockToRender"/>
>   <t:trigger event="cleanupEnvironment"/>
> </t:block>
> 
> This would allow Tapestry to just render your block; inside your
> block, the setupEnvironment event would be where you would push into
> the environment; the blockToRender would be the value you'd normally
> return from your onAction() event handler method.  The
> cleanupEnvironment event would be used to pop the value out of the
> environment.
> 

I've tried this solution, but it's only a partial one for us, it has two
problems:

* it would need to be applied at every point where such a construct is used
and introduces quite some complications as well
* it only fixes the case where the environmental value is needed during
rendering

In our specific case the blocks might trigger other event, which in turn
again need access to the environment and also can't access it. Implementing
the fix suggested above doesn't help here, as the original page/template
that could set up the environment is no longer directly involved.

regards
Joachim Sauer

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/5-3-Too-much-environment-cloaking-bug-tp5005584p5119460.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to