Hello;

I have this one working. But now I have implemented another wotomanyrealationship. The structure is exactly the same ag the mgtOfc except it is for training. when I try to load the page with that wotomany on it I get the follow error trace.

 dwtm
Error:  java.lang.NullPointerException
Reason:         
Stack trace:    
File    Line#   Method  Package
EOSortOrdering.java     605     _genericCompareTo       com.webobjects.eocontrol
EOSortOrdering.java     644     compareAscending        com.webobjects.eocontrol
EOSortOrdering.java     522     compareValues   com.webobjects.eocontrol
EOSortOrdering.java     363     compare         com.webobjects.eocontrol
_NSCollectionPrimitives.java 306 K2SortArray com.webobjects.foundation EOSortOrdering.java 202 _sortUsingKeyOrderArray com.webobjects.eocontrol EOSortOrdering.java 254 sortArrayUsingKeyOrderArray com.webobjects.eocontrol _WOJExtensionsUtil.java 94 _sortEOsUsingSingleKey com.webobjects.woextensions
WOToManyRelationship.java       456     theList         
com.webobjects.woextensions
NativeMethodAccessorImpl.java   NA      invoke0         sun.reflect
NativeMethodAccessorImpl.java   39      invoke  sun.reflect
DelegatingMethodAccessorImpl.java       25      invoke  sun.reflect
Method.java     585     invoke  java.lang.reflect
NSKeyValueCoding.java   684     methodValue     com.webobjects.foundation
NSKeyValueCoding.java   1160    valueInObject   com.webobjects.foundation
NSKeyValueCoding.java   1268    valueForKey     com.webobjects.foundation
WOComponent.java        1539    valueForKey     com.webobjects.appserver
NSKeyValueCoding.java   498     valueForKey     com.webobjects.foundation
NSKeyValueCodingAdditions.java

What would cause EOSortOrdering to fail like this?

Don
On Dec 9, 2007, at 6:33 PM, Lachlan Deck wrote:

On 10/12/2007, at 5:45 AM, Don Lindsay wrote:

When I use the following settings I can save and the listbox shows the correct number of rows and the correct selected items.

Great.

ToManyRelationship: WOToManyRelationship {      
        sourceEntityName = "Agents";
        destinationDisplayKey = "orgs";
        sourceObject = agent;
        relationshipKey = "mgtOfc";
}

However it is a cominbation of all fields in the orgs entity that are being displayed separated by commas and surrounded by curly braces. So I set destinationDisplayKey to orgs.description

to get a more user friendly view. I get an error that com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: valueForKey(): lookup of unknown key: 'orgs.description'.

You need to set the destination display key as the key *from* the objects found at "mgt0fc" rather than from your source object.

So that should be something like:
destinationDisplayKey = "org.description"; // i.e., it's a toOne from your join record.

with regards,
--

Lachlan Deck



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/pccdonl% 40mac.com

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to