[ 
https://issues.apache.org/struts/browse/WW-2256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43374#action_43374
 ] 

Jeromy Evans commented on WW-2256:
----------------------------------

I haven't noticed this issue before.  My interpretation is:

When clearing a field error, the existing javacript assumes a specific 
structure of the html elements that contain the field errors
(eg. e.parentNode.parentNode).

The patch replaces this assumption with a search for a parent node of type TR.  
That seems fine...

I assume then that the problem exists only where the template has been changed 
from the default???  Is that right?

I don't understand why the patch has also changed the labels errorFor to 
reference elements by name instead of id.  That doesn't seem right.


Ben, it probably helps to initially provide a description of the problem and 
how it's been fixed by the patch, especially if it's not reproducible for 
others, otherwise the volunteer committers are likely to place it in the "too 
hard basket" and push it back to later release.  Assume the assignment to 2.1.4 
simply means "not 2.1.1".

I assume the larger of the two patches applies.


> Validation broken on autocompleters
> -----------------------------------
>
>                 Key: WW-2256
>                 URL: https://issues.apache.org/struts/browse/WW-2256
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Mechanism, Plugin - Tags
>    Affects Versions: 2.0.9, 2.1.0
>         Environment: Issue identified on Windows XP using Firefox
>            Reporter: Benjamin McCann
>            Priority: Critical
>             Fix For: 2.1.4
>
>         Attachments: allFieldsFilledOnSubmit.png, siteEmptyOnSubmit.png, 
> validation.js.patch, validation.js.patch
>
>
> I have an autocompleter named "site":
> <s:url id="siteList" action="AutocompleteField" method="selectSite" 
> namespace="/general" />
> <sx:autocompleter label="Site" value="%{system.site}"
>       forceValidOption="true"
>       cssStyle="width:132px; height:18px; border:1px solid #7B9EBD"
>       name="site" required="true" href="%{siteList}"
>       loadOnTextChange="true" showDownArrow="false" dropdownWidth="300"
>       searchType="substring" />
> It has the following validator:
> <field name="site">
>     <field-validator type="requiredstring">
>         <message>Field is required</message>
>     </field-validator>
> </field>
> When I submit my .jsp without site filled in I get the message: "TypeError: 
> row.cells has no properties"
> When I submit my .jsp with site filled in I get message that the field is 
> required and all the other fields are blanked out.

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

Reply via email to