• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WODisplayGroup, ERXWORepetition and object deletion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WODisplayGroup, ERXWORepetition and object deletion


  • Subject: Re: WODisplayGroup, ERXWORepetition and object deletion
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 03 Dec 2015 17:45:43 +0000
  • Thread-topic: WODisplayGroup, ERXWORepetition and object deletion

I’d look at a less than generic solution in my thought experiment.  Maybe ERXEORepetition.  And use some form of the global ID as the element ID for the elements.  Then in the implementation, you would do a map look up of the global ID to get the EO, rather than an index lookup.  I have not thought this all the way through, but it seems doable.  Each time in the reception has a unique id (see uniqueKey on ERXWORepetition).  There is no reason this has to translate into an indexed lookup.

Chuck


From: <webobjects-dev-bounces+chill=email@hidden> on behalf of Paul Hoadley <email@hidden>
Date: Thursday, December 3, 2015 at 2:25 AM
To: WebObjects Development <email@hidden>
Subject: WODisplayGroup, ERXWORepetition and object deletion

Hello,

This issue has come up on the list a few times over the years, and I’ve pieced together a workable solution. This post is just to see if anyone can suggest a better one.

I have an ERXWORepetition that loops over the displayedObjects() of a WODisplayGroup. The objects are Job EOs, and within the loop there’s a hyperlink that allows a user to delete the selected Job. (You can see where this is leading.) At some point, users A and B both hit the Jobs list page which displays Jobs J1, J2, J3. User A deletes J1. User B is still on the same list page, and deletes J1—except, obviously, J1 has already been deleted, and the application silently deletes J2 instead.

Setting er.extensions.ERXWORepetition.checkHashCodes=true in Properties and binding the ERXWORepetition’s notFoundMarker to a null-valued variable in the component is a pretty good workaround: now, in the action method, if the item variable is null, I know the selected Job was not found, and I can display an informational message.

Is that the best I can do? In this slightly abridged scenario, the Job got deleted, and that was the only action available, so the informational message can say “The selected Job was already deleted”. But all I really know is that the Job is no longer where it once was in displayedObjects()—right? Say it just got moved by that action method above—is there any way to retrieve J1 when user B hits that method? (I’m not convinced you’d want that in every case, or even many cases, because the selection has been made based on stale data in front of user B. Let’s just consider this a thought experiment.)


-- 
Paul Hoadley
http://logicsquad.net/


 _______________________________________________
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

  • Follow-Ups:
    • Re: WODisplayGroup, ERXWORepetition and object deletion
      • From: Paul Hoadley <email@hidden>
References: 
 >WODisplayGroup, ERXWORepetition and object deletion (From: Paul Hoadley <email@hidden>)

  • Prev by Date: Re: WODisplayGroup, ERXWORepetition and object deletion
  • Next by Date: Re: wotaskd reliability
  • Previous by thread: Re: WODisplayGroup, ERXWORepetition and object deletion
  • Next by thread: Re: WODisplayGroup, ERXWORepetition and object deletion
  • Index(es):
    • Date
    • Thread