You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jens <wo...@gmx.de> on 2005/03/05 19:39:36 UTC

page redisplay

Hi,

is there a difference between: 

a) a method of a listener that just ends, and
b) a method of a listener that ends with cycle.activate(<myself>)

with respect to properties which have been declared 

1) to be persistent
2) to be non persistent

??

Any hints apreciated,
Jens



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


Re: page redisplay

Posted by Jens <wo...@gmx.de>.
Marcus Brito <mbrito <at> gmail.com> writes:

> [...]
> Not really. Even if you didn't explictly activated another page the
> request cycle came to an end, and every time this happens, your page
> gets initialized and returned to the pool. If it didn't, it would lead
> to a great source of confusion  in the form of "my properties are not
> being reset after the listener is called, what is happening?"
> questions. [...]

I'm happy with either behavior as far as it's consistent. 

Thanks for clarification!
Jens



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


Re: page redisplay

Posted by Marcus Brito <mb...@gmail.com>.
> I've the feeling, there should be a difference, i.e., doing (a) should sustain
> the properties even though they are non-persistent, because the page isn't sent
> back to the page cache. Using cycle.activate(<myself>) OTOH would initialize the
> properties.

Not really. Even if you didn't explictly activated another page the
request cycle came to an end, and every time this happens, your page
gets initialized and returned to the pool. If it didn't, it would lead
to a great source of confusion  in the form of "my properties are not
being reset after the listener is called, what is happening?"
questions.

Oh well, I guess questions can't be avoided at all :) Using
cycle.activate(this) is just a matter of taste. I usually do put this
code of line at the end of my listeners, for the sake of clarity.

-- Marcus

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


Re: page redisplay

Posted by Jens <wo...@gmx.de>.
Marcus Brito <mbrito <at> gmail.com> writes:

> 
> There shouldn't be any difference, Jens. Tapestry just re-activates
> the current page at the end of the request cycle if no other page was
> activated.
> 

I've the feeling, there should be a difference, i.e., doing (a) should sustain
the properties even though they are non-persistent, because the page isn't sent
back to the page cache. Using cycle.activate(<myself>) OTOH would initialize the
properties.
It's probably my lack of understanding of the workflow of tapestry.

Thanks anyway,
Jens



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


Re: page redisplay

Posted by Marcus Brito <mb...@gmail.com>.
There shouldn't be any difference, Jens. Tapestry just re-activates
the current page at the end of the request cycle if no other page was
activated.

-- Marcus Brito <mb...@gmail.com>

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