cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: CForms: validation error bubbling
Date Thu, 23 Sep 2004 15:18:51 GMT
Sylvain Wallez wrote:

> Hi all,
> 
> Looking at the paginated repeater patch [1], I again encountered the 
> problem of non-displayed widgets that can have validation errors and 
> therefore forbid form validation, leading to confusing situations for 
> the user.
> 
> A general solution for this problem could be to "bubble up" validation 
> errors: when the validation error or a widget changes (including when 
> it's set to null), the widget notifies its parent of this fact. That can 
> allow us to easily implement validation-error gatherers in container 
> widgets to display that there's a problem "somewhere" in the container.
> 
> For example, in the case of paginated repeater, page numbers or 
> scrolling buttons may give visual feedback if errors exist outside of 
> the displayed page.
> 
> For wizards, we could have group or struct widgets representing each 
> page which, by gathering errors raised by their children, would allow to 
> display a global validation status of the wizard or drive the user back 
> to offending pages.
> 
> Thoughts?

We do have <validation-error> template element. It can be extended, for 
example, by adding attribute recursive="true" or some such, to collect 
all errors from the given container widget. Wouldn't it solve the issue?

Or, we can add new <validation-errors> element to do the same.

Vadim


Mime
View raw message