Re: Binding synchronization timing problems
Re: Binding synchronization timing problems
- Subject: Re: Binding synchronization timing problems
- From: John Larson <email@hidden>
- Date: Fri, 30 Jun 2006 07:28:38 -0500
In tandem to Chuck's diagnosis, the component appears to be working
exactly as designed, just not as intended. Remember, the generator
will not pass the bindings along to the component until it finds the
component in the course of page generation. That means that the
bindings will not be passed to the pagercomponent until it the
pagercomponent is generated. In your case, the pagercomponent is
generated after the repetition, so the generator isn't going to pass
the bindings to the pager component until the repetition has already
got its partialList from the pager. The caveat to this is when there
is form submission or a specific action. For instance, calling the
"nextPage" action against the pager. This will run this code first,
which is why you are seeing some behavior.
So, as to the solution, I would recommend trying adding
pullValuesFromParent() to the getReviewersPartialList() method
(perhaps the first line of the method). This method causes the
bindings to be brought in to the component ahead of the normal
binding time (component generation). It is ok to do this so long as
you remember that it is there, and so long as you use the component
the same throughout your ap. When the repetition calls the
getReviewersPartialList, the method will get its bindings bringing in
the list, and then it will have the list. When the component is
generated, the bindings will be reapplied, but it won't matter.
John
On Jun 29, 2006, at 3:59 PM, Miguel Arroz wrote:
Hi!
I'm having some strange problem here, and I still could not
understand what's happening. It's somehow related to chapter 7,
Mysteries of Binding Synchronization on Practical WO book.
I have a table in my page, made with a WORepetition component. I
wanted to write a pager component, to "page" the table. So I
did! :) To link together the pager and the repetition, I used the
following schema:
Pager: PagerComponent {
partialList = reviewersPartialList;
originalList = reviewersList;
}
ReviewerRepetition: WORepetition {
list = reviewersPartialList;
item = currentReviewer;
index = currentIndex;
}
Miguel Arroz
"I felt like putting a bullet between
the eyes of every Panda that wouldn't
scr*w to save its species." -- Fight Club
Miguel Arroz
http://www.ipragma.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden