[ 
http://issues.apache.org/struts/browse/SHALE-373?page=comments#action_39177 ] 
            
Craig McClanahan commented on SHALE-373:
----------------------------------------

I agree that this would be a desireable change.

For reference, the Commons Validator ticket can be found at:

  https://issues.apache.org/jira/browse/VALIDATOR-219



> New display method for client validation error message
> ------------------------------------------------------
>
>                 Key: SHALE-373
>                 URL: http://issues.apache.org/struts/browse/SHALE-373
>             Project: Shale
>          Issue Type: New Feature
>          Components: Validator
>            Reporter: Joost Schouten
>            Priority: Minor
>             Fix For: TBD
>
>
> Hi,
> I would like to suggest to make an enhancement to the client side validation 
> process so that the client validation error message is displayed the same way 
> the client side validation messages are displayed. Personally I would prefer 
> making this the default behavour and eliminating the JavaScript alert(). 
> Another option might be to change the value passed through to the client 
> attribute of the s:commonsValidator tag to multiple options like "alert" and 
> "message".
> When message would be chosen, the JavaScript will populate the <div> 
> representing the h:message tag.
> I think this will result in a more elegant notification to the enduser.
> example:
> --------------------------
> <h:inputText id="email" value="#{contact.email}">
>               <s:commonsValidator type="required" 
> message="#{labels['err.requiredField']}" server="true" client="message"/>
> </h:inputText>
> <h:message for="email" styleClass="error"/>
> --------------------------
> We currently have a fairly elaborate system in place where empty JavaScript 
> Array's are generated for each validator type. Whenever a value needs to be 
> validated, the input object will be added to the specific validator Array. On 
> submit each array will be checked for their correct values , messages are 
> dysplayed acoringly and the request is stopped.
> How do you think we should implement this feature, and what part of this 
> process belongs in Shale, and what part belongs in the commons validator. I 
> also posted this RFE in the validator issue tracker.
> Thank you,
> Joost 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to