Hi,

Am Donnerstag, den 06.12.2007, 10:16 +0100 schrieb Carsten Ziegeler:
> But then, I think it might get a little bit tricky. First, I don't see a
> need for a Validator interface - there is currently no place to hook it in.

What do you mean ? The ValidatorService just is there to be called by
servlets and scripts. The ValidatorService in turn listens for Validator
service being registered and grabs them plus looks for validator scripts
on demand.

> Second, I could imagine that it might get difficult to have a generic
> mechanism which creates a "good looking" response out of the Errors
> object. Therefore I guess we need some application specific error
> handling (whatever that means, I have no clean picture yet).

Very true. This is why the ValidatorService does not render the response
itself but rather returns an Errors object containing all validation
issues.

> Depending on what people use to create their response (jsps, javascript
> etc.), they are free to use whatever validation framework (spring,
> commons validation etc.) in there application. All we need to provide is
> a hook to call this stuff at the right time (through the
> ValidationService interface or some scripting stuff).

Yes, the ValidationService as proposed above.

> So I think all we need to do is to come up with two additional
> resolutions during process handling: resolving the validation service
> for the current request and in the case of errors resolving an error
> handler.

First we already have the ErrorHandlerServlet mechanism in place.
Second, any script or servlet may include a response suitable to render
the validation errors. It think, there are enough mechanisms in place,
they just must be used. Maybe the microjax interface must be enhanced to
handle validation check feedback.

Regards
Felix

Reply via email to