Yes, you are right... I better comment on the context. :-)
I'm playing with ajax tabbed panel and tabs.
Each component in a tab is getting its own editing context. Its own
sandbox. :-)
If the user is editing something in tab1 (i.e. has pending edits), he
can switch to tab2 and change something there and save that... then
come back to tab1 and the changes there are still pending and he can
click save there. Anyways, each tab has its own sandbox.
But this design breaks when you have a new EO because you cannot make
a copy of the EO into the other editing contexts used by the other tabs.
And I think it also breaks if I attempt to make a copy of the EO if it
has pending changes from tab1 for example (right?).
So... I could change it to have all the tabs share the editing context
and would probably make things easier... I just wished I could have
the tab submit the form within the displayed tab when the user
switches tabs... Otherwise the user will change something in a text
field in tab1 then switch to tab2 and then back to tab1 and notice
that the change made in the text field was lost.
Thanks,
Ricardo
On Mar 26, 2009, at 4:22 PM, Ken Anderson wrote:
Ricardo,
As others have pointed out, this is not allowed. If you let us know
the context you want to use it in, maybe we can suggest
alternatives...
Ken
On Mar 26, 2009, at 3:16 PM, Ricardo J. Parada wrote:
Hi All,
If I have an EO that has not been saved to the database (i.e.
newFoo in my code below), is it possible to do the following:
Foo localFoo = newEO.localInstanceIn(localEditingContext());
Normally I get the error:
java.lang.IllegalStateException: You attempted to localInstance
<com.model.Foo pk:"null">, which has not yet committed.
But I think that it should be allowed, even if that requires that I
get a primary key for localFoo.
Does anybody know if that can be accomplished??
_______________________________________________
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/kenlists%40anderhome.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]