[
https://issues.apache.org/struts/browse/SHALE-356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43750#action_43750
]
Jeff Tsay commented on SHALE-356:
---------------------------------
I there are too many ways of displaying the validation errors that we should
just leave it up to the client. In my case, I'm using XUL so whatever HTML
handler code won't work anyway. So that is why I propose allowing the user to
add some custom data to the metadata of a validator tag. When the error handler
is invoked, the custom data is sent to the error handler. In the simple case
the custom data can just be the id of the <h:message> tag, and the error
handler can just get the node and put the error message in the node. But a lot
more complicated things could be done, which are also possible with this
scheme. Could you look at SHALE-490 again to see if that is sufficient?
I actually have been working with the solution proposed in SHALE-490 and it
works well. The only caveat is that I need to clear all nodes in which I put
error messages each time before I call the validation routine in javascript.
> Make it possible to report client side validation errors via DHTML
> manipulations on message elements
> ----------------------------------------------------------------------------------------------------
>
> Key: SHALE-356
> URL: https://issues.apache.org/struts/browse/SHALE-356
> Project: Shale
> Issue Type: Improvement
> Components: Validator
> Reporter: Craig McClanahan
> Fix For: TBD
>
>
> Currently, the Shale Validator implementation reports client side validation
> errors the way that was also used in Struts -- a pop-up alert box. It would
> be very useful to be able, instead, to use DHTML manipulation on the client
> side to update an <h:message> component relevant to the input component(s) in
> error, and/or an <h:messages> component to capture all messages.
> This is likely to depend on some refactoring of the javascript methods
> provided by Commons Validator 1.3.1.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.