You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kurtis Williams <kw...@mshare.net> on 2005/01/31 19:32:44 UTC

Persistent Page Properties between Pages

I was unsure what happens when a persistent property that has the same
name is used on several pages.  I had read someplace that the value will
be the same on all the pages.

So, I dug into the source and learned that the ID path of a page or
component is used to construct the HTTP Session attribute name for
storing the persistent value.  Since pages return "null" for their ID
path, that means that my earlier assumption is correct.  A persistent
page value will be the same value on two pages that have a persistent
property with the same exact name.

This seems a little backwards to me.  I'd assume that each page is
atomic and that changes on one page should not affect a second page.  I
guess this concept would be useful for Wizards or something.  What
exactly is the rationale for this behavior?

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


Re: Persistent Page Properties between Pages

Posted by Howard Lewis Ship <hl...@gmail.com>.
On Mon, 31 Jan 2005 11:32:44 -0700, Kurtis Williams
<kw...@mshare.net> wrote:
> I was unsure what happens when a persistent property that has the same
> name is used on several pages.  I had read someplace that the value will
> be the same on all the pages.
> 
> So, I dug into the source and learned that the ID path of a page or
> component is used to construct the HTTP Session attribute name for
> storing the persistent value.  Since pages return "null" for their ID
> path, that means that my earlier assumption is correct.  A persistent
> page value will be the same value on two pages that have a persistent
> property with the same exact name.

The HttpSession attribute key includes the application id (i.e., the
name of the servlet) and the name of the page, as well as the
component id path and property name.

> 
> This seems a little backwards to me.  I'd assume that each page is
> atomic and that changes on one page should not affect a second page.  I
> guess this concept would be useful for Wizards or something.  What
> exactly is the rationale for this behavior?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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