You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by David Ezzio <de...@ysoft.com> on 2004/04/13 14:11:33 UTC
Re: Mutable Persistent Page Properties (2nd attempt)
I rather thought that someone would address this question. Is it poorly
framed, or what???
David Ezzio wrote:
> For some reason, my first posting of this note ended up in the archives
> but never got reflected back out to the mailing list.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Mutable Persistent Page Properties (2nd attempt)
Posted by David Ezzio <de...@ysoft.com>.
Hi David,
Well, at least you looked at it. :)
Here's the issue in a nutshell (I am using Beta 3, so perhaps the
problem has been fixed.) fireObserver must be called when persistent
page properties are changed because this is the mechanism that tells
Tapestry to store the attribute in the HttpSession object. This is not
a big deal if you use Tapestry's auto-enhancment for abstract
properties. The enhancement added code calls the fireObserver method.
The problem is that calling fireObserver does nothing in the Hangman1
example, since the recordChange method checks to see if the object to be
set is the same object as is in the HttpSession already. For Tapestry
to work as advertised in TIA, something has to change. Either Tapesty
must make copies of the mutable objects when it stores them in the page,
or the page recorder can not assume that checking the reference is
sufficient to detect a change in the object.
In other words, this line of code in SessionPageRecorder.recordChange:
if (newValue == oldValue) return;
must go away. It works only if the objects that contain the values of
the persistent page properties are themselves immutable.
David
David Moran wrote:
> I went back and looked at your original post and I was not able to follow
> what you were talking about with the fireObserved event, but my
> understanding from the TIA book is that the setAttribute for the mutable
> objects (which includes the engine itself) is called by the framework at the
> end Engine.service() method if the objects have changed.
>
> -----Original Message-----
> From: David Ezzio [mailto:dezzio@ysoft.com]
> Sent: Tuesday, April 13, 2004 7:12 AM
> To: Tapestry users
> Subject: Re: Mutable Persistent Page Properties (2nd attempt)
>
>
> I rather thought that someone would address this question. Is it poorly
> framed, or what???
>
> David Ezzio wrote:
>
>
>>For some reason, my first posting of this note ended up in the archives
>>but never got reflected back out to the mailing list.
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Mutable Persistent Page Properties (2nd attempt)
Posted by David Moran <dm...@nc.rr.com>.
I went back and looked at your original post and I was not able to follow
what you were talking about with the fireObserved event, but my
understanding from the TIA book is that the setAttribute for the mutable
objects (which includes the engine itself) is called by the framework at the
end Engine.service() method if the objects have changed.
-----Original Message-----
From: David Ezzio [mailto:dezzio@ysoft.com]
Sent: Tuesday, April 13, 2004 7:12 AM
To: Tapestry users
Subject: Re: Mutable Persistent Page Properties (2nd attempt)
I rather thought that someone would address this question. Is it poorly
framed, or what???
David Ezzio wrote:
> For some reason, my first posting of this note ended up in the archives
> but never got reflected back out to the mailing list.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org