> -----Original Message-----
> From: Christian Haul [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 15, 2001 11:17 AM
>
> I think the patch addresses almost all of your points. There are only
> a small number of error codes available corresponding to the
> validation rules currently supported. They are organized in a
> java.util.HashMap with the parameter name as key.
>
> >     * form name
>
> Mmmh, I reckon this would be encoded as a parameter but wouldn't be
> determined by the validation process, would it. Please give an example
> how you would like to see this supported.

Well, maybe this can be solved through some other mechanisms, but currently
I'm using it to identify the form where to show errors. Real-life case:
* I have a page with many forms.
* I submit one of the forms, some errors occur (they do not have to be
validation errors, could be some unexpected exceptions also).
* Because of an error, I do an internal redirect back to the old page with
many forms.
* While generating the old page, I need to know on which form I should show
the error(s).

> >     * field name
>
> Thus when an error occured and the action directs the flow to the
> error page every parameter has to be checked to see what when
> wrong. Hence you're not provided with the name of the offending field
> but with a per field status.

well, then you already have the name of the field? :-)

> >     * related data (optional)
>
> Related data -- I don't know what this could be. If this is static and
> related to a field it could be retrieved from the descriptor.xml file
> through xsp-formval:get-attribute. If it's dynamically related to the
> validation process -- I don't know. If you could provide an example I
> will try to see how it fits or what could be done to cater for it.

It is dynamic. For example, I have an web-based email application (e.g.
Hotmail) that allows to enter more than one email address in the "to" field.
After the user has entered something, I run it though the validator that
checks if the list was well formed. If the list was not well formed or if
one of the addresses was incorrect, then I need to point out, which address
was incorrect. With this dynamic data, I could stuff this data in there. Ok?

Neeme


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to