• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unexpected behavior of Validator's Java Script  RSS feed

Velika Srbija
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
During development of a Struts based wizard-app I encountered very strange behavior of Validator's JavaScript.
Lost almost whole night trying to figure out what is goin' on.?

Here is description of the problem:

JSP page:
<html:javascript formName="appForm" />
<html:form action="appAction.do" onsubmit="return validateAppForm(this)" >
<html:hidden property="page" value="1" />
<html:text property="proba" value="" />

<form name="appForm">
<field property="proba" page="1" depends="required,integer">
<arg0 key="resources.error.proba" />

Server-side validation runs OK, but client-side validation doesn't occur at all?
I have figured out why is that happening, but currently have no solution. Here lies the problem:
In order to force client-side validation "page" attribute should be removed from the <field> tag in validation.xml file.
In that case everything runs OK but there is no wizard style of my app.

Is it a bug in the Validator framework, or I'm doing somethig wrong?
Have You any solution?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!