Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1443 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

[PATCH] Attribute access issue in twAjaxTools

Reported by: dave.marsh Owned by: alberto
Priority: normal Milestone: 2.0
Component: ToscaWidgets Version: 1.0.2
Severity: normal Keywords:


This is a patch regarding an issue I discovered while using twAjaxTools. If you try to use the AjaxTableForm? Widget and have a form field named "id", the current javascript will cause errors the second time you try to submit.

When the form is first created, a hidden HTML input element is also created and given the value of the HTML form. This is so that the callback function knows which form it should refresh or write error messages to. When this element is created, the function "getAttribute('id')" is called. This will unambiguously get the ID of the form.

However, when the javascript receives the callback from the server, it calls reset_form(). In here, the id of the HTML input element is reset (why, I do not know). The problem occurs in the way it is reset. It is set to this.form.id. This works if you do not have an input element named id. If you do, incorrect values are stored and the form breaks.

Attached is a patch that will fix the issue by replacing this.form.id with this.form.getAttribute('id').


toscawidgetsAjaxTools.patch Download (547 bytes) - added by dave.marsh 12 years ago.
The patch file for this issue

Change History

Changed 12 years ago by dave.marsh

The patch file for this issue

comment:1 Changed 12 years ago by koba

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in [3268]. Thanks!.

Note: See TracTickets for help on using tickets.