[
https://issues.apache.org/jira/browse/TAPESTRY-2418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Howard M. Lewis Ship resolved TAPESTRY-2418.
--------------------------------------------
Resolution: Duplicate
Fix Version/s: 5.0.13
Assignee: Howard M. Lewis Ship
Duplicates TAPESTRY-2341.
> Form onsubmit event handler for Zone component handling is ignored if any
> fields on the form have validation configured.
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-2418
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2418
> Project: Tapestry
> Issue Type: Bug
> Components: JavaScript
> Affects Versions: 5.0.12
> Environment: Windows Vista Home Premium,
> Firefox 2.0.0.14,
> Internet Explorer 7.0.6000.16643,
> Reporter: Eric Rogers
> Assignee: Howard M. Lewis Ship
> Fix For: 5.0.13
>
>
> If I have a page containing a form and an associated Zone component to
> update, everything works as expected. However, when I add validation to a
> field on the form, the submission for the form is treated as a non-AJAX
> submission.
> More specifically, from looking at the tapestry.js script, it appears that
> when the page is loaded, the form's onsubmit event handler is at first bound
> properly. However, the Tapestry.FormEventManager appears to rebind the
> onsubmit event to its own handleSubmit function, completely ignoring the
> previous event handler.
> Below is some code for a Test page, which I created to demonstrate the issue:
> Test.tml:
> <t:Zone t:id="statusZone"/>
> <t:Form t:Zone="statusZone">
> <t:TextField t:id="name" t:value="name"/>
> <t:Submit/>
> </t:Form>
> Test.java:
> public class Test {
> private String name;
> //if we remove @Validate("required"), everything works as expected.
> @Validate("required")
> public String getName() {
> return name;
> }
> public void setName(String name) {
> this.name = name;
> }
> Object onSuccess() {
> JSONObject response = new JSONObject();
> response.put("content", "test me");
> return new JSONStreamResponse(response);
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]