cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <>
Subject Re: [CForms] Load/Save model events never send?
Date Thu, 06 Jul 2006 06:32:19 GMT
Quoin Developers wrote:
> Actually, it appears that I can save from an action handler - but it's
> a little tricky and probably not the recommended way (calling validate
> on the Form from the action handler).
> form.form.validate()
> if (form.form.isValid()) {
> form.getChild("contentMessages").addMessage(new I18nMessage('saved',
> 'application'));
> }
Uh, that's ugly. Now my intention with the phase checking for save was
that you can only save if the form is valid which imho makes sense.
Saving an invalid form can lead to unpredictable situations I guess.

Now, I would be interested in other opinions. Should we remove these
checks or not?


Carsten Ziegeler - Open Source Group, S&N AG

View raw message