• 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: Sorting Function without WOSort?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting Function without WOSort?


  • Subject: Re: Sorting Function without WOSort?
  • From: Janice Cheung <email@hidden>
  • Date: Wed, 06 Jul 2005 15:13:22 -0400

   Hi Sacha!  Thanks for writing me back!

Can you explain how to do this? I have already created the sort order in the EOModel under Sort Ordering corresponding
to each individual Fetch Specification.


   In my code I have:

   public WOComponent sortByDept(){
   UserHome nextPage = (UserHome)pageWithName("UserHome");
   fetchDeptServers();
   return nextPage;
   }

public void fetchDeptServers(){
EOFetchSpecification fetchSpec = EOFetchSpecification.fetchSpecificationNamed("getServerByDept", "Server");
NSMutableDictionary dict=new NSMutableDictionary();
fetchSpec= fetchSpecificationWithQualifierBindings(dict);
EOEditingContext ec= ((Session)session()).defaultEditingContext();
NSArray results=ec.objectsWithFetchSpecification(fetchSpec);
setM_Servers(results);
}


but because my Display Group Option is to "Fetch on Load" with Sorting by dnsName and I've already called the fetchSpecification,
it doesn't do anything when i do the sortByDept action.


What am I missing? I feel as though there is some trivial step that I have looked over ...

   Thanks so much for your help!

Best regards,
Janice



Sacha Mallais wrote:

On Jul 6, 2005, at 11:08 AM, Janice Cheung wrote:


If I am trying to implement the WOSort functionality on text headings without including the images (the arrows
that go descending and ascending), how can I achieve this if I am using a displayGroup that fetches the display
data on load? It seems that if I use fetch specifications and call them via actions, they cannot successfully
sort the data columns (by name, by department, etc) because the page is set to display one specific type of
sorting on load. Is there a way around this?


Just tell the display group to change it's sort order:
http://developer.apple.com/documentation/WebObjects/Reference/API/com/ webobjects/eointerface/EODisplayGroup.html#setSortOrderings (com.webobjects.foundation.NSArray)



sacha


_______________________________________________
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: Sorting Function without WOSort?
      • From: Sacha Mallais <email@hidden>
References: 
 >WO Builder Icons vs. Menues (From: Markus Ruggiero <email@hidden>)
 >Re: WO Builder Icons vs. Menues (From: Christopher Pavicich <email@hidden>)
 >Re: WO Builder Icons vs. Menues (From: Florijan Stamenkovic <email@hidden>)
 >Re: WO Builder Icons vs. Menues (From: Markus Ruggiero <email@hidden>)
 >Re: WO Builder Icons vs. Menues (From: Christopher Pavicich <email@hidden>)
 >Re: WO Builder Icons vs. Menues (From: Nathan Walker <email@hidden>)
 >Re: WO Builder Icons vs. Menues (From: Florijan Stamenkovic <email@hidden>)
 >Re: WO Builder Icons vs. Menues (From: Alan Ward <email@hidden>)
 >Re: WO Builder Icons vs. Menues (From: Chuck Hill <email@hidden>)
 >Re: WO Builder Icons vs. Menues (From: David Holt <email@hidden>)
 >Sorting Function without WOSort? (From: Janice Cheung <email@hidden>)
 >Re: Sorting Function without WOSort? (From: Sacha Mallais <email@hidden>)

  • Prev by Date: Re: Spring Frameworks
  • Next by Date: Re: Sorting Function without WOSort?
  • Previous by thread: Re: Sorting Function without WOSort?
  • Next by thread: Re: Sorting Function without WOSort?
  • Index(es):
    • Date
    • Thread