• 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
WODisplayGroup sort question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WODisplayGroup sort question


  • Subject: WODisplayGroup sort question
  • From: Michael Engelhart <email@hidden>
  • Date: Mon, 23 Aug 2004 10:52:02 -0500

Hi -

I have a WODisplayGroup that I'm trying to sort but I can't seem to get it working.

Here's my code that does the sort/WODisplayGroup update:

NSArray sortedArray;
NSMutableArray sortOrderings = new NSMutableArray();
EOSortOrdering sortByName = new EOSortOrdering("name", EOSortOrdering.CompareAscending);
sortOrderings.addObject(sortByName);
sortedArray = EOSortOrdering.sortedArrayUsingKeyOrderArray(displayGroup.allObjects(), sortOrderings);
displayGroup.setObjectArray(sortedArray);


The problem is that the data being displayed on the page isn't sorted correctly. I read in previous posts that this is how you should do it but then in the WO API docs it says:
"Invoked from fetch to set the array of fetched objects; should almost never need to be invoked explicitly"


When I loop through the object array and print out the "name" property, the array of objects is sorted properly. Also the name field is all uppercase so it's not that I need to do a case insensitive sort.

Is there some kind of "update()" method that tells the WODIsplayGroup to display new data? Not sure what it means but the data does come back "changed", but it's not sorted correctly, it looks as if it's partially sorted...there are sections that are sorted but then every 10 or so items there's a name in say the "A"'s that starts with a W or Z.

Thanks for any help.

Mike
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: WODisplayGroup sort question
      • From: Nathan Dumar <email@hidden>
  • Prev by Date: Re: How WO compare with JDeveloper
  • Next by Date: Simple Design Question
  • Previous by thread: Re: How WO compare with JDeveloper
  • Next by thread: Re: WODisplayGroup sort question
  • Index(es):
    • Date
    • Thread