cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Menard <kmen...@servprise.com>
Subject Re: Cleaning up ROP
Date Sun, 11 Nov 2007 16:12:05 GMT
On 11/11/07 9:28 AM, "Andrus Adamchik" <andrus@objectstyle.org> wrote:

> 
> On Nov 8, 2007, at 10:19 AM, Kevin Menard wrote:
> 
>> 
>> 1) Serialization -- Fields are controlled by getters/setters and as
>> such
>> should probably be marked transient, allowing a fault to resolve
>> values
>> upon deserialization.
> 
> I don't understand this one. Why?

Consider the following Tapestry syntax:

<tr jwcid="@For" source="ognl:paintings" value="ognl:painting">
   <span jwcid="@Insert" value="ognl:painting.title"/>
</tr>

I've simplified this because it's not a form and thus no rewind cycle, but
that's really when the problem occures.  The basic issue is that when
"painting" is assigned and thus serialized (via the Squeezer), the "title"
field is null.  In the pass through the loop, the "title" field is resolved
and the local field changed from null to whatever the title is.  On a form
rewind, Tapestry reserializes all values to see if anything has changed.  It
essentially has a map keyed on serialized values to objects.  When the
serialized value changes, as is the case here due to the change in the
"title" field, it can't find it in the map and attempts to reconstruct the
object.

This is how the context was carried along using CDO.  As it turns out, the
context was never serialized in my case -- the fully registered object was
just pulled out of Tapestry's map.

Hopefully that made some sense.

-- 
Kevin


Mime
View raw message