You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joel Trunick <Jo...@SmartPrice.com> on 2003/04/14 18:22:05 UTC

beginResponse() behavior

We put some logic in the overriden beginResponse() method that we only
wanted to run once when the page is loaded. It appears that sometime this
may possibly be getting run multiple times when the page loads. Is this
expected behavior for this method to be called multiple times, or is this a
bug (in 2.3)?

As an aside, I realize putting this logic in this method may be a bit of a
hack, is there a better place to put the logic?

Thanks,
Joel Trunick
www.smartprice.com

Re: beginResponse() behavior

Posted by joe panico <jo...@panmachine.biz>.
> sometime this may possibly be getting run multiple times when the 

Yes, it should get called on a render _and_ on a rewind.


> bit of a hack, is there a better place to put the logic?

prepareForRender() might work.

regards,

joe



--
Open WebMail Project (http://openwebmail.org)


---------- Original Message -----------
From: Joel Trunick <Jo...@SmartPrice.com>
To: "'Tapestry users'" <ta...@jakarta.apache.org>
Sent: Mon, 14 Apr 2003 11:22:05 -0500
Subject: beginResponse() behavior

> We put some logic in the overriden beginResponse() method that we 
> only wanted to run once when the page is loaded. It appears that 
> sometime this may possibly be getting run multiple times when the 
> page loads. Is this expected behavior for this method to be called 
> multiple times, or is this a bug (in 2.3)?
> 
> As an aside, I realize putting this logic in this method may be a 
> bit of a hack, is there a better place to put the logic?
> 
> Thanks,
> Joel Trunick
> www.smartprice.com
------- End of Original Message -------


RE: beginResponse() behavior

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
> 
> We put some logic in the overriden beginResponse() method 
> that we only wanted to run once when the page is loaded. It 
> appears that sometime this may possibly be getting run 
> multiple times when the page loads. Is this expected behavior 
> for this method to be called multiple times, or is this a bug 
> (in 2.3)?
> 
> As an aside, I realize putting this logic in this method may 
> be a bit of a hack, is there a better place to put the logic?

Most likely, overriding finishLoad() is the way to go.

> 
> Thanks,
> Joel Trunick
> www.smartprice.com
>