Agreed. I believe a modification similar to RIFE's Form handling, with
something like an onValidation(Object bean) could be useful. The
validation framework could grab the Element that it's working with and
call the method passing it the Bean containing the property being
valided. The Element could handle the data however it wanted (custom
validation errors) or it could automatically authenticate it. I
believe I'd require you to specify if you want it automatically
handled or you prefer to manually handle the field (it would be based
on class name.. like class="validated" or class="validated-manual" and
if you wanted to also use the constraints on the bean you would need
to manually call the validation frameworks methods in your "custom"
validation method. I need to think about the last part there some
more.

Comments?,
 Tyler

On 7/18/06, Steven Grimm <[EMAIL PROTECTED]> wrote:
Is that sufficient? What if there isn't a validation error from the
point of view of the bean constraints? Take my previous example of a
non-admin entering a value that only admins are allowed to enter. In
that case the value itself is perfectly legal, so there would be no
error for the element to trap and modify.

-Steve


Tyler Pitchford wrote:
> Actually, I'm thinking the Element could "trap" the errors it wants
> and replace them itself before it's sent back over AJAX. Right now,
> the Server compiles the template, extracts what the error message(s)
> would have been on a post back and sends that to the client. It
> wouldn't be hard for the Element to trap that response and simply
> replace it with whatever it wants. The tricky part is hooking the
> error calls correctly, because the way the frame is now, I never see
> what went wrong, I only see the "final" output. Hmmm.
>
> Cheers,
>  Tyler

_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to