Re: Display group design question
Re: Display group design question
- Subject: Re: Display group design question
- From: Chuck Hill <email@hidden>
- Date: Fri, 4 Dec 2009 09:57:49 -0800
On Dec 4, 2009, at 6:54 AM, Jon Nolan wrote:
I have had a problem with variations on this since my early days
with WO and I've never solved it to my satisfaction. Time to ask
for help.
* Page has a display group (ERXBatchingDisplayGroup) using EC1 in
the fetch spec. For the sake of example the EOs in the list are
colors - 25 total with 10 on each page. Colors are sorted by name.
* The second page contains GREEN through PINK. User clicks on ADD
COLOR.
* Lightbox (AjaxModalDialog) appears and allows user to edit the new
color in a peer or nested editing context - EC2. My usual approach
is to use a nested ec.
* User adds ORANGE and saves changes. Lightbox disappears.
Container surrounding the display group is updated.
What is the best way to update the display group at this time? I've
tried calling fetch(), redisplay(), updateDisplayedObjects(),
combinations of the above, etc. with various levels of success but I
always run into trouble with something.
Setting the DG qualifier or sortOrdering (to the same value) will
cause ERXBatchingDisplayGroup to refetch.
Either the list doesn't refresh correctly re: sort order or the
batch navigation bar doesn't know when the batch count increases.
The only sure fire way I've found is nullifying the display group
and starting over. This seems very inefficient and I'm sure I'm
missing something.
I don't want to use the same editing context to edit as I need to
discard the insert on cancel/overlay dismissal of the AMD. I
realize it is possible to use a single ec and revert but it grates
me to jump through those hoops when a second ec is so easy. The
only problem I have with the latter is getting my display group and
associated batch navigation bar updated consistently and correctly.
Thanks in advance,
Jon
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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