You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Eulogi Vidal (JIRA)" <ji...@apache.org> on 2008/01/31 18:04:39 UTC

[jira] Updated: (WW-2466) Client side validation bug

     [ https://issues.apache.org/struts/browse/WW-2466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eulogi Vidal updated WW-2466:
-----------------------------

    Description: 
In a form loaded in an Ajax div, client-side validations don't work. 
The error that appears when submitting the form is:

"ReferenceError: validateForm_save is not defined"

There's a problem rendering form-close-validate.ftl template.

Example:

    ...
    <s:tabbedPanel id="myPanel" >

      <s:div id="Tab1" label="Tab 1" theme="ajax" labelposition="top" href="list.action" refreshOnShow="true">

    ...

 list.action returns this JSP:

                ...
		<div style="width: 300px;border-style: solid">
			<p>Person Data</p>
			<s:form action="save" validate="true">
			    <s:textfield id="id" name="person.id" cssStyle="display:none"/>
				<s:textfield id="firstName" label="Fisrt Name" name="person.firstName"/>
				<s:textfield id="lastName" label="Last Name" name="person.lastName"/>
				<s:submit theme="ajax" targets="persons" notifyTopics="/save"/>
			</s:form>
		</div>
                 ...

Thanks.

Eulogi Vidal.

  was:
In a form loaded an Ajax div, client-side validations don't work. 
The error that appears when submitting the form is:

"ReferenceError: validateForm_save is not defined"

There's a problem rendering form-close-validate.ftl template.

Example:

    ...
    <s:tabbedPanel id="myPanel" >

      <s:div id="Tab1" label="Tab 1" theme="ajax" labelposition="top" href="list.action" refreshOnShow="true">

    ...

 list.action returns this JSP:

                ...
		<div style="width: 300px;border-style: solid">
			<p>Person Data</p>
			<s:form action="save" validate="true">
			    <s:textfield id="id" name="person.id" cssStyle="display:none"/>
				<s:textfield id="firstName" label="Fisrt Name" name="person.firstName"/>
				<s:textfield id="lastName" label="Last Name" name="person.lastName"/>
				<s:submit theme="ajax" targets="persons" notifyTopics="/save"/>
			</s:form>
		</div>
                 ...

Thanks.

Eulogi Vidal.


> Client side validation bug
> --------------------------
>
>                 Key: WW-2466
>                 URL: https://issues.apache.org/struts/browse/WW-2466
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.11
>         Environment: Operating System: Microsoft Windows XP Service Pack 2
> Server: Apache Tomcat 5.5
>            Reporter: Eulogi Vidal
>
> In a form loaded in an Ajax div, client-side validations don't work. 
> The error that appears when submitting the form is:
> "ReferenceError: validateForm_save is not defined"
> There's a problem rendering form-close-validate.ftl template.
> Example:
>     ...
>     <s:tabbedPanel id="myPanel" >
>       <s:div id="Tab1" label="Tab 1" theme="ajax" labelposition="top" href="list.action" refreshOnShow="true">
>     ...
>  list.action returns this JSP:
>                 ...
> 		<div style="width: 300px;border-style: solid">
> 			<p>Person Data</p>
> 			<s:form action="save" validate="true">
> 			    <s:textfield id="id" name="person.id" cssStyle="display:none"/>
> 				<s:textfield id="firstName" label="Fisrt Name" name="person.firstName"/>
> 				<s:textfield id="lastName" label="Last Name" name="person.lastName"/>
> 				<s:submit theme="ajax" targets="persons" notifyTopics="/save"/>
> 			</s:form>
> 		</div>
>                  ...
> Thanks.
> Eulogi Vidal.

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