• 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: problem with selectedObject of EOFormController in Java Client
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with selectedObject of EOFormController in Java Client


  • Subject: Re: problem with selectedObject of EOFormController in Java Client
  • From: Jaime Magiera <email@hidden>
  • Date: Sat, 4 Sep 2004 00:17:13 -0400

Ok, here are questions on a semi-related note. Is this display group notification also the place where I should be setting default values for the display group's inserted objects? If not, where?

Question on setting those values:

I've been unable to create default values that consist of other EOObjects (i.e. relationships). In every code configuration I've tried, an error is thrown. My application is groupware, where many new objects are assigned a group based on login information (from an extended JCAuthentication.framework). The idea is to get the instance of the UserGroup from the framework, then use that value to set the new object's UserGroup. Setting it as a default value throws various errors. As a work around, I tried setting the relationship on 'save'. That throws errors also. The interface goes blank. When I restart the app, the object was saved to the database with proper values, including the relationship. The weird thing is that the error is a NULL POINTER EXCEPTION on a value that was NOT set as a default -- and it's properly saved to the database anyway. I don't understand. Is this something about updating the interface?

Any ideas?

Jaime

-------------
public boolean save(){
//editingContext().saveChanges();
if (((MediaProject)selectedObject()).userGroup() == null) {
thisUserGroup = (UserGroup)AuthenticationCenter.sharedAuthenticationCenter().thisJCUserG roup(editingContext());

System.out.println("this is the editing context: " + thisUserGroup.editingContext() + "\n and this is the display group editing contrext " + editingContext());

if (thisUserGroup == null) {
System.out.println("The usergroup is null. Damn.");
} else {
System.out.println("The usergroup is not null. So something else is up.");
((MediaProject)selectedObject()).setUserGroup(thisUserGroup);
editingContext().saveChanges();
}
return true;
}
return true;
}


---------- Returns -----

this is the editing context: com.webobjects.eocontrol.EOEditingContext@174689
and this is the display group editing contrext com.webobjects.eocontrol.EOEditingContext@174689
The usergroup is not null. So something else is up.
apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NullPointerException
java.lang.NullPointerException
at com.webobjects.eodistribution.client.EODistributedObjectStore._fireDefer redFault(EODistributedObjectStore.java:1159)
at com.webobjects.eodistribution.client.EODistributionDeferredFaultHandler. createFaultForDeferredFault(EODistributionDeferredFaultHandler.java:20)
at com.webobjects.eocontrol.EOCustomObject.willReadRelationship(EOCustomObj ect.java:1302)
at com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_LazyG enericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java: 560)
at com.webobjects.eocontrol.EOCustomObject.storedValueForKey(EOCustomObject .java:1736)
at ThoughtConduitWO.client.Project.accessLevel(Project.java:53)....
_______________________________________________
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.



References: 
 >RE: problem with selectedObject of EOFormController in Java Client (From: <email@hidden>)

  • Prev by Date: Re: JMS Change Notification/Shared Editing Context
  • Next by Date: Re: problem with selectedObject of EOFormController in Java Client
  • Previous by thread: Re: problem with selectedObject of EOFormController in Java Client
  • Next by thread: OT: Java Based TEXTAREA -> HTML Library
  • Index(es):
    • Date
    • Thread