You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Lenny Primak (JIRA)" <ji...@apache.org> on 2013/09/07 03:39:51 UTC
[jira] [Closed] (TAP5-1730) Ajax Zone is improperly reloaded when a
mixin submits form via JavaScript
[ https://issues.apache.org/jira/browse/TAP5-1730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lenny Primak closed TAP5-1730.
------------------------------
Resolution: Fixed
Fix Version/s: 5.4
Since form submission was rewritten in 5.4, there is no need to call submit directly, so this problem is gone
> Ajax Zone is improperly reloaded when a mixin submits form via JavaScript
> -------------------------------------------------------------------------
>
> Key: TAP5-1730
> URL: https://issues.apache.org/jira/browse/TAP5-1730
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Priority: Minor
> Fix For: 5.4
>
>
> Tapestry reloads the zone improperly if JS code
> Improperly submits the form. It should at least give some kind of an error
> or a warning when happens.
> Right now, it fails silently leading to an improper zone reload,
> which leads to weird errors when app is running subsequently.
> If form..setSubmittingElement(() isn't called before form.onsubmit(),
> the Tapestry silently fails and the zone is improperly reloaded.
> ---------------------------------------------------------------
> There was an addition of one line:
> $(this.formId).setSubmittingElement($(this.elementId)); // *** ADDED otherwise zone gets improperly reloaded
> $(this.formId).onsubmit(); // Submit Ajax form
> If you don't add the first line, the form is reloaded improperly after the zone update,
> so it doesn't work the second time.
> This is not documented anywhere, and really hard to debug.
> See threads:
> http://mail-archives.apache.org/mod_mbox/tapestry-users/201110.mbox/%3C21CB9971-ED77-4F37-9C72-501D0F5137B5@hope.nyc.ny.us%3E
> http://tapestry.1045711.n5.nabble.com/Mixins-stop-working-after-a-zone-update-please-help-td4935912.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira