Hi.. thanks for your help.. 
I think I have isolated the problem. As per your suggestion.. we have
implemented a model owned by the parent component that is passed as a
binding parameter to the child component. The problem was that at the
time when the DirectLink is called we needed access to the model (bound
parameter).. We should have changed to an ActionLink instead of trying
to persist the bound parameter in order to use a direct link..

Thanks again for your help.

Luke Galea 
Software Development
BlueCat Networks
905-762-5225
 

-----Original Message-----
From: Howard M. Lewis Ship [mailto:[EMAIL PROTECTED]] 
Sent: October 2, 2002 8:11 PM
To: Anton Shapiro; [EMAIL PROTECTED]
Subject: Re: [Tapestry-developer] Difficulties to get component be
persistent

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


-------------------------------------------------------
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