Hm. You seem to be getting your terminology slightly confused.
So, you have a component with a persistent property and you mutator method
invokes fireObservedChange().
That's half the battle.
In previous discussions, the reason the finishLoad method is mentioned is
because components with persistent properties should implement the event
interface PageDetachListener ... finishLoad is the best place to register,
i.e.,
finishLoad()
{
getPage().addPageDetachListener(this);
}
public void pageDetached()
{
_object = null;
}
(This is from memory, probably some minor mistakes).
So you have a listener method, takeValueFromLink, is it:
public void takeValueFromLink(IRequestCycle cycle)
{
setObject(cycle.getServiceParameters()[0]);
}
----- Original Message -----
From: "Anton Shapiro" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 02, 2002 3:16 PM
Subject: [Tapestry-developer] Difficulties to get component be persistent
Hello.
I have a problem, I can't solve.
Component takes Object as a parameter from the calling Page. Component calls
the "fireObservedChange" in the "setObject" method. The implementation of
the "finishLoad" method is also provided which sets Object to the value
null. The component implements "DirectLink" service and once the link is
clicked "listener.takeValueFromLink" is triggered the value should be
assigned to the "Object.getValue" method, but apparently the object is null.
Which results in a exception.
It seems like ether the object not getting saved , or object gets
overwritten by the default value null.
Can any body help?
Thanks.
-------------------------------------------------------
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
-------------------------------------------------------
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