cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: [C2] actions, forms, etc.
Date Wed, 30 May 2001 17:41:40 GMT
On Wed, 30 May 2001, Neeme Praks wrote:

> The example is about form validation and this is the area I'm currently
> investigating. AFAICT, the current form validation action implementation has
> one main deficiency: it does not allow the form validating code to return a
> meaningful error message to the user.

why don't you patch it to put an error message (if applicable) in the map
it returns, and in the sitemap switch on that message - if it's there,
present an error page to the user, otherwise go on to the success route?

> All it does, is redirect back to the form, no error messages involved.
> And with the sitemap structure that I presented above, the error message
> passing is not even possible because the "failure" part of the sitemap does
> not have any information passed in from the action.
> So, to work around this problem, I would propose to inverse the structure of
> the sitemap in the case of form validation:
>           <map:act type="check for form values">
>             <!-- form values not ok, redirect back to form. error
> information is passed in with the objectmodel -->
>           </map:act>
>           <!-- form values ok, save the data-->
>
> What do you think? Does this approach have any disadvantages?

i think it's counterintuitive.

- donald


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message