Re: EditingContext Newbiee Question
Re: EditingContext Newbiee Question
- Subject: Re: EditingContext Newbiee Question
- From: Lachlan Deck <email@hidden>
- Date: Sun, 3 Aug 2008 08:36:15 +1000
Hi Gustavo,
On 03/08/2008, at 12:37 AM, Gustavo Pizano wrote:
Ok so let's say I have this
try {
session().defaultEditingContext().saveChanges();
} catch (ValidationException e) {
setErrorMsgs(e.getMessage());
} catch (EOGeneralAdaptorException e) {
setErrorMsgs(e.getMessage());
}
Using the ERXEC how should it be then?
Exactly the same.
However with non-defaultEditing contexts you need (if not using ERX
ecs) to handle locking/unlocking also (which can be tricky sometimes
with ensuring your contexts are locked for access (e.g., during
component.awake() and perhaps your opportunity to unlock doesn't get
called because of some exception).
ec = newEditingContext();
ec.lock();
try {
finally
{
ec.unlock();
}
Im asking this for a couple of reasons, first of all when i started
to learn WO, I asked what would be a better start, from WO, or from
WOnder, it was huge discussion, but my final conclusion was that i
can start with Wonder due the things it provides me.
Good choice.
Im doing the LicensePlate tutorial but with Wonder, I did it already
with WO, so I want to see the differences form Wonder and WO in this
tutorial.
It's really too early for you to make the decision as to whether it's
worth using Wonder based on a beginners tutorial. Take the advice of
more experienced devs on this one. It'll pay off.
with regards,
--
Lachlan Deck
_______________________________________________
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