• 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: How do make WOPopup use my sorting?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: How do make WOPopup use my sorting?


  • Subject: RE: How do make WOPopup use my sorting?
  • From: "Jonathan Fleming" <email@hidden>
  • Date: Fri, 01 Oct 2004 16:31:41 +0100

Where is your list coming from? If it a fetch in EOModel you'll want to do a sort through the Sort Ordering tab of the fetchSpec. Once you've chosen the attributes you want to sort by you have the option of making it an ascending or decending sort or case or non-case sensitive.

If your list is being fetched programmatically then you will have to use the EOSortOrdering API similar to this

       // sort ordering by last Name only
       if (sortByLastName != null) {

EOSortOrdering lastNameSortOrdering =
EOSortOrdering.sortOrderingWithKey("lastName", EOSortOrdering.CompareAscending);


           NSArray sortOrderings =
               new NSArray( new Object[]{lastNameSortOrdering});

           // Sort away!
           EOSortOrdering.sortArrayUsingKeyOrderArray(yourList,
                                                      sortOrderings );
       }


// sort oordering by last then first name if (sortByLastName != null) {

EOSortOrdering lastNameSortOrdering =
EOSortOrdering.sortOrderingWithKey("lastName", EOSortOrdering.CompareAscending);
EOSortOrdering firstNameSortOrdering =
EOSortOrdering.sortOrderingWithKey("firstName", EOSortOrdering.CompareAscending);


NSArray sortOrderings =
new NSArray( new Object[]{lastNameSortOrdering, firstNameSortOrdering});


           // Sort away!
           EOSortOrdering.sortArrayUsingKeyOrderArray(yourList,
                                                      sortOrderings );
       }


HTH Jonathan :^)


From: James Cicenia <email@hidden>
To: WebObjects (Group) <email@hidden>
Subject: How do make WOPopup use my sorting?
Date: Wed, 29 Sep 2004 11:27:14 -0500

Hello -

It seems as though WOPopup, or in this case the popup from WOtoOneRelationhip is
using an alphabetical sort... I want it to use my sort.


Am I missing a switch somewhere?

-James Cicenia

_______________________________________________
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

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger


_______________________________________________
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


  • Prev by Date: Re: Adaptor Info for Microsoft SQL Server problem
  • Next by Date: WebService decoding Base64Binary
  • Previous by thread: Re: Adaptor Info for Microsoft SQL Server problem
  • Next by thread: WebService decoding Base64Binary
  • Index(es):
    • Date
    • Thread