I am relatively new to WO.. I finally put together a
web application (internal to the company) that is not
very big. 

I am using the examples in the Marker book to create a
to-many relationship. (publications have sections). I

 I just implemented a removeSection action with this
code:

    public WOComponent deleteSection() {
//              System.out.println("deleting a row!");

        
session().defaultEditingContext().deleteObject(theSection);
                session().defaultEditingContext().saveChanges();
        
publication.removeObjectFromBothSidesOfRelationshipWithKey(theSection,
"sectionss");
        return null;
    }

everything is fine so far.. except if I try to add a
new section object. my app crashes. 

this is the top of the error log:

java.lang.IllegalStateException: Cannot obtain
globalId for an object which is not registered in any
editingContextobject: {values = {sectiontrim = ;
sectioncomment = ; sectiontitle = "aaaaaa";
sectionbleed = ; sectionsafety = ; }; this = ""; },
databaseContext:
[EMAIL PROTECTED],
object's editingContext: null, databaseContext's
active editingContext:
[EMAIL PROTECTED]


Should I be 'clearing' the editingContext? What am I
missing in the logic of WebObjects?

Ted




      
____________________________________________________________________________________
Shape Yahoo! in your own image.  Join our Network Research Panel today!   
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


 _______________________________________________
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