Binding synchronization timing problems
Binding synchronization timing problems
- Subject: Binding synchronization timing problems
- From: Miguel Arroz <email@hidden>
- Date: Thu, 29 Jun 2006 21:59:10 +0100
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;
}
So, as you can see, the pager gets the full list from the top
level component (the "reviewersList") and has a "getter" method for
the partialList, which is the segment of the list that should be shown.
WORepetition binds it's list to the partialList (a variable in the
top level component).
When the pager comes BEFORE the WORepetition, everything works as
it should. Pager does its magic, and the table displays accordingly.
But we want the pager to show up after the WORepetition. So, I
moved it there. And the problem starts here.
When I open the page for the first time, the table shows up empty.
The pager says we are on page one, and has links to all the other
pages, so the pager is working correctly. When I change the page, the
new page displays the table in the correct page, and everything goes
back to normal.
So, my questions are:
1) Why does the table displays empty when the browser opens my
page for the first time? I was expecting something like this to
happen by reading Practical WO book, but I still did not fully
understand the mechanism.
2) Why does the problem goes away after the first pager use? If I
clicked on page X, i was expecting to see page 1 (because it was the
last one that I should had seen). Then, clicking on page Y, it would
show X. But no. It shows X and Y, respectively.
3) How do I solve this mess?
Yours
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:
This email sent to email@hidden