Re: Sorting Relationed Records
Re: Sorting Relationed Records
- Subject: Re: Sorting Relationed Records
- From: Nathan Dumar <email@hidden>
- Date: Wed, 21 Jul 2004 13:44:54 -0400
I suspect that the value was not successfully passed for some reason.
Make sure you have really passed the value to the next page (make sure
the page's variable is not null).
On the next page, before trying anything else, try:
System.out.println(thePassedObject.anyAttribute());
Nathan
On Jul 20, 2004, at 8:11 PM, A. Uchida wrote:
Posted again, because the original message didn't have subject.
Hi there,
I am doing a practice of WO application using MacOSX 10.3, Xcode and
WO5.2.
I've faced a problem of EOSortOrdering and can't work out by myself.
From a previous list view page (Fetch by WODisplayGroup) and pass a
record
to a next page. The record (EntityA) has to-many relationship to
EntityB.
My part of the code is as follows.
Whatever I tried at this moment, " java.lang.NullPointerException" at
the first line of the following codes. (aKeyOfEntityA.relations()
doesn't return any records)
In the next page, there is no WODisplayGroup. I used to bind
aKeyOfEntityA.relations to
the list of WORepetition and this shows a list of related EntityB
records.
Any help would be very much appreciated.
NSArray anArray = new NSArray(aKeyOfEntityA.relations());
EOSortOrdering so1 = EOSortOrdering.sortOrderingWithKey("ep_date",
EOSortOrdering.CompareAscending);
EOSortOrdering so2 =EOSortOrdering.sortOrderingWithKey("ep_Category",
EOSortOrdering.CompareAscending);
NSArray soList = new NSArray(new Object[]{so1, so2});
sortResult = EOSortOrdering.sortedArrayUsingKeyOrderArray(anArray,
soList);
A. Uchida
_______________________________________________
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.