> Component event lifecycle events are only triggered when the whole page or 
> component is rendered. In this case, you're rendering a Zone, so your page 
> isn't rendered (just a part of it) and setupRender() and afterRender() aren't 
> invoked. Use the RenderNotification mixin or the Trigger component inside 
> your zone to push and pop objects in the Environment.

In this version I have push the object in event method 'onPlusOne', 
env.push(String.class, "++" + this.count); 
This works in previous version of tapestry.

I also tried Trigger component.

        <t:zone elementName="div" t:id="textzoneS">
                <t:trigger event="setupRender" />
                [${cont}]
                <t:trigger event="afterRender" />
        </t:zone>

It doesn't works.


On Nov 8, 2011, at 12:59 AM, Thiago H. de Paula Figueiredo wrote:

> On Mon, 07 Nov 2011 14:51:37 -0200, Bo Gao <eli...@gmail.com> wrote:
> 
>>      void setupRender() {
>>              env.push(String.class, "++" + this.count);
>>      }
>> 
>>      void afterRender() {
>>              env.pop(String.class);
>>      }
> 
> Component event lifecycle events are only triggered when the whole page or 
> component is rendered. In this case, you're rendering a Zone, so your page 
> isn't rendered (just a part of it) and setupRender() and afterRender() aren't 
> invoked. Use the RenderNotification mixin or the Trigger component inside 
> your zone to push and pop objects in the Environment.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br

--
Bo Gao
eli...@gmail.com






Reply via email to