cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: [cforms] refactoring questions (was Re: cvs commit: cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel
Date Wed, 21 Apr 2004 17:33:29 GMT
On 21.04.2004 13:53, Marc Portier wrote:

> so I'm going for getId on form to return "" (which it was)
> and removing getId() == null checks since I favour the NPE here

Please not waiting for the NPE somewhere latter in the code for the 
reasons Ugo pointed out.

>>>> 7/ should validation stop as soon as possible or continue to allow 
>>>> all validation errors to be set?
>>> Don't know which is best.  *If* we cannot decide (due to different needs
>>> in different usecases) then we will need to add an attribute to let the
>>> form designer control the behaviour.
>> hm, we should at least be consistent
> clarifying a bit more:
> we seem to have two distinct cases:
> widgets with child-widgets
> - i've seen code that doesn't evaluate the parent if one of the kids is
> invalid
> - but all kids seem to be evaluated even if a previous brother failed
> widgets with validation on definition and widget level
> - widget level rules stop evaulation if the definition level was not ok,
> and as soon as one of the widget-level validations fails
> I haven't given it much thought yet, if there are clear positions out
> there I'm quite happy to just enforce code wise (and add some javadocs
> removing any possible future surprise)
> so comments welcome

IMO validation should always run on all widgets as it must be possible 
for the user to get a whole form fixed in one step:


View raw message