You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Miguel Diaz (JIRA)" <ji...@apache.org> on 2009/01/30 18:29:46 UTC

[jira] Created: (WW-2975) client side validation and components with forms

client side validation and components with forms
------------------------------------------------

                 Key: WW-2975
                 URL: https://issues.apache.org/struts/browse/WW-2975
             Project: Struts 2
          Issue Type: Improvement
          Components: Other
    Affects Versions: 2.1.6
            Reporter: Miguel Diaz


When form-close-validate.ftl generates the JavaScript validation code, it only takes into account the fields that are present in the <s:form> when it's processed (via parameters.tagNames).
There are two problems with this:

- if for some reason a field is missing, the validation will fail but no message will be displayed
- if one creates a <s:component> that builds a form and gets some fields passed to it in a parameter (i.e. receives the HTML generated by some fields) then the form doesn't know about the fields so they aren't included in the "tagNames" parameter, thus not taken into account for the JavaScript validation

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-2975) client side validation and components with forms

Posted by "Dave Newton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45542#action_45542 ] 

Dave Newton commented on WW-2975:
---------------------------------

I'm adding a hack for allowing custom JavaScript validation; it's a temporary work-around until there's a more robust client-side validation framework in place. I'm not sure when it will be committed; hopefully tomorrow. Directions for use will appear on the wiki--it may help you in the interim.

> client side validation and components with forms
> ------------------------------------------------
>
>                 Key: WW-2975
>                 URL: https://issues.apache.org/struts/browse/WW-2975
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Other
>    Affects Versions: 2.1.6
>            Reporter: Miguel Diaz
>
> When form-close-validate.ftl generates the JavaScript validation code, it only takes into account the fields that are present in the <s:form> when it's processed (via parameters.tagNames).
> There are two problems with this:
> - if for some reason a field is missing, the validation will fail but no message will be displayed
> - if one creates a <s:component> that builds a form and gets some fields passed to it in a parameter (i.e. receives the HTML generated by some fields) then the form doesn't know about the fields so they aren't included in the "tagNames" parameter, thus not taken into account for the JavaScript validation

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-2975) client side validation and components with forms

Posted by "Dave Newton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46003#action_46003 ] 

Dave Newton commented on WW-2975:
---------------------------------

I haven't done *anything* non-work-related for a few months, so no.

Um... I think the temporary hack would handle this assuming the dev writes the additional validation. Not sure about anything related to the <s:component> tag, though--the hack allows for arbitrary validation, though.

I'll see if I can't get this in early next week, should actually be doable as right now I'm not doing much but answering phone calls for jobs that have nothing to do with anything I know anything about. What's up with that?!

> client side validation and components with forms
> ------------------------------------------------
>
>                 Key: WW-2975
>                 URL: https://issues.apache.org/struts/browse/WW-2975
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Other
>    Affects Versions: 2.1.6
>            Reporter: Miguel Diaz
>
> When form-close-validate.ftl generates the JavaScript validation code, it only takes into account the fields that are present in the <s:form> when it's processed (via parameters.tagNames).
> There are two problems with this:
> - if for some reason a field is missing, the validation will fail but no message will be displayed
> - if one creates a <s:component> that builds a form and gets some fields passed to it in a parameter (i.e. receives the HTML generated by some fields) then the form doesn't know about the fields so they aren't included in the "tagNames" parameter, thus not taken into account for the JavaScript validation

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-2975) client side validation and components with forms

Posted by "Wes Wannemacher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45986#action_45986 ] 

Wes Wannemacher commented on WW-2975:
-------------------------------------

Dave, I'm too lazy to look around and see if your hack is in place... If so, is it enough to close this issue? 

> client side validation and components with forms
> ------------------------------------------------
>
>                 Key: WW-2975
>                 URL: https://issues.apache.org/struts/browse/WW-2975
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Other
>    Affects Versions: 2.1.6
>            Reporter: Miguel Diaz
>
> When form-close-validate.ftl generates the JavaScript validation code, it only takes into account the fields that are present in the <s:form> when it's processed (via parameters.tagNames).
> There are two problems with this:
> - if for some reason a field is missing, the validation will fail but no message will be displayed
> - if one creates a <s:component> that builds a form and gets some fields passed to it in a parameter (i.e. receives the HTML generated by some fields) then the form doesn't know about the fields so they aren't included in the "tagNames" parameter, thus not taken into account for the JavaScript validation

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.