Bugs item #608768, was opened at 2002-09-13 06:09
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=104754&aid=608768&group_id=4754

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: jason owens (jlowenz)
Assigned to: Nobody/Anonymous (nobody)
Summary: Changes saved AFTER IPage.detach()

Initial Comment:
If one creates a new object in a page constructer (e.g.
a HashMap for tracking sparse changes to a list), and
proceeds to call fireObservedChange("hashmap", hashmap)
when a value is added to that hashmap, the expected
behavior is that the hashmap will be saved into the
session for use during form rewinding, etc...

However, consider that instead of setting this hashmap
null in the detach() method, we only want to clear() it
for the next time around: so we call hashmap.clear() in
the detach() method.

The result is that your data will NOT be observed,
since it is being saved to the session AFTER the page
is detached (and thus results in a cleared hashmap). 

There are two ways around this: do not modify the
object in detach(), instead just null it and create it
new next time the page is loaded (where do you do that,
BTW?) OR send a clone() of the map to the
fireObservedChange method.

It is very confusing when you expect to be able to do
any kind of initialization in the detach() method.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=104754&aid=608768&group_id=4754


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to