Re: Sorting Function without WOSort?
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