History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WW-1486
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: tm_jee
Reporter: Giuseppe Pace
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
WebWork

Unexpected behavior in Firefox with <ww:hidden> tag and ajax validation

Created: 06/Nov/07 10:56 AM   Updated: 14/Nov/07 03:50 PM
Component/s: Views
Affects Version/s: 2.2.6
Fix Version/s: 2.2.7

Environment: Only Firefox browser


 Description  « Hide
Firefox (seem all versions) has an issue with the Ajax validation and WW hidden tag.
If there is an <ww:hidden .../> in jsp view, when onblur event occur more one times new error message is added without remove the previous message. This issue occur only when there is the hidden tag.
 
For example:

This is JSP file

<ww:form id="f1" action="Login" method="post" validate="true" theme="ajax" >
<ww:hidden name="username"/>
<ww:textfield label="UserName" name="docente.userName" required="true" />
<ww:password label="Password" name="docente.pass" required="true"/>
<ww:submit id="b1" value="Accedi" />
</ww:form>

and this the *-validation.xml

<validators>
<field name="docente.userName">
<field-validator type="requiredstring">
<message> Nome utente non inserito </message>
</field-validator>
</field>
<field name="docente.pass">
<field-validator type="requiredstring">
<message> Password non inserita </message>
</field-validator>
</field>
</validators>

If i click more times, obviously without insert data, on UserName textfield or Password textfield, the error messages are displayed without remove the previouses message

 All   Comments   Change History      Sort Order:

vgarro - [11/Nov/07 08:07 PM ]
I guess I have a generic solution.
In fix time. Pls take a look of this. It may save you guys some time.

Replace:
  var table = form.childNodes[1];
    if( typeof table == "undefined" ) {
        table = form.childNodes[0];
    }

for:
  var table = form.childNodes[1];
for(var i= 0 ; i < form.childNodes.length ; i ++){
if( typeof form.childNodes[i].rows != "undefined"){
table = form.childNodes[i];
break;
}
}

Cheers cats!

tm_jee - [12/Nov/07 10:01 AM ]
Fixed. changes are at :-

Sending java/template/xhtml/validation.js
Transmitting file data .
Committed revision 2963.