[Erp5-dev] Validation of dialog

Łukasz Nowak lukasz.nowak at ventis.com.pl
Tue Mar 18 12:23:40 CET 2008


Hello,

On 2008-03-13, 20:38:00
Jérome Perrin <jerome at nexedi.com> wrote:

(...)
> In Base_edit, when the form does not validate, the form is called
> again in the same REQUEST, and fields display old values because they
> lookup the value in the REQUEST ( this is done in _get_default method
> in Products/Formulator/Field.py ).
> 
> It's possible to do something similar in the dialog's action script:
> 
> if invalid:
>    request.set('portal_status_message', N_('This is not valid !'))
>    return context.Base_viewYourDialog(request)

Great! For now it is enough. The only thing I miss, is to easy showing
error fields, but I'll try to figure it out.

It was so simple... ;)

Luke

-- 
Łukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...'' I am only craftsman.



More information about the Erp5-dev mailing list