[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNUe] [Bug] gnue-forms / gnue-appserver: OnChange / abort / editabl
Re: [GNUe] [Bug] gnue-forms / gnue-appserver: OnChange / abort / editable="new"
Tue, 06 May 2008 09:05:37 +0200
Mozilla-Thunderbird 126.96.36.199 (X11/20080420)
David Ayers schrieb:
> Hello Reinhard!
> Reinhard Mueller schrieb:
>> Am Samstag, den 03.05.2008, 11:48 +0200 schrieb David Ayers:
>>> When saving an newly to be inserted object fails due to an abort
>>> during the OnChange processing in the gnue-appserver, the form's field
>>> property editable="new" is misinterpreted in the sense that the
>>> fields become deactivated ...
> Well let's look at this... the reason to implement OnValidate is to
> insure the data is, well, valid and consistent. The purpose is to raise
> an exception when the data is invalid.
>>From the documentation:
> `OnValidate' can prevent the commit to happen if it raises an
> exception with `abort' or by other means.
> So the expectation of a naive application developer like me would be
> that if validation fails as documented (ie an abort), the entire
> transaction from the view of the appserver should be rolled back as if
> it never happened and the client that requested the commit is notified.
As a temporary workaround, I decided to duplicate my appserver
validation into a PRE-COMMIT trigger in the block of the form on the
Now I would have expected that if called abort there, that the message
would be displayed to the user and the COMMIT be abandoned. But it the
call to abort seems to be ignored! (I've added 'print "Aborting!"' to
verify that the abort is being called.)
I'll now try to debug this.