create new to-many objects in d2w
create new to-many objects in d2w
- Subject: create new to-many objects in d2w
- From: Theodore Petrosky <email@hidden>
- Date: Fri, 12 Jul 2013 11:33:57 -0400
when I create a new to-many object there is a button with a label 'Save'. I understood that this new object was inserted into the EC and I had to click the save button at the bottom of my parent EO to actually save the related object.
but of course there is a problem. If I add an object and immediately click its delete button, my app throws a hissy-fit because the object can not be deleted as it is not saved in the first place.
So the question is. when I create a new object, and click save, shouldn't d2w do just that? saveChanges() on the EC?
this is the saveButton's action (from ERMODWizardCreationPage). /** * Performs submit action. Overridden to reset the nested validation setting on the * object. */ // FIXME - Is this needed here? davidleber @Override public WOComponent submitAction() throws Throwable { WOComponent result = super.submitAction(); if (object() instanceof ERXGenericRecord) { ((ERXGenericRecord)object()).setValidatedWhenNested(true); } return result; }
I keep following back the super.submitAction() to see what it does but there is no implied saveChanges() anywhere that I can find.
|
_______________________________________________
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