Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036445 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | major | always | 2017-07-07 11:37 | 2017-07-13 10:53 | |||
Reporter | malsasua | View Status | public | |||||
Assigned To | ranjith_qualiantech_com | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | cb08b24b56b5 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | migueldejuana | |||||||
OBNetwork customer | OBPS | |||||||
Support ticket | 47437 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036445: many listeners are being created for change event in scrollable table when lines are not added in the last position | |||||||
Description | When orderlines are created and they are inserted not in the last position (because a customization)[attached], then the method _createComponentForModel of ScrollableComponent component is creating listeners for events change and updateview many times for lines which already have it. | |||||||
Steps To Reproduce | see attachment | |||||||
Proposed Solution | Option 1 (preferred) Test it carefully!! Create a static function. Maybe backbone will detect that your "on" is against a function which is already being used as a listener, so it will not create the listener this.func_checkAll = function (col) { //if the same collection is used by different components and one of them has been destroyed, the event is ignored if (this.destroyed) { if (this.collection) { this.collection.off('checkAll', this.func_checkAll); } return true; } this.collection.each(function (model) { model.trigger('check'); }); }; this.collection.on('checkAll', this.func_checkAll, this); Option 2 When creating listerners, first check if a model is already connected to a listener function. If it is, remove the listener (off) and then create again the listener (on). example: if (!this.func_focus) { this.func_focus = function () { //stuff }; } this.task.off('focusCalculated', this.func_focus); this.task.on('focusCalculated', this.func_focus); //end workaround | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
|
![]() |
|
(0098055) hgbot (developer) 2017-07-13 08:13 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: cb08b24b56b58ef9c9998840d4e302041f31b42a Author: Ranjith S R <ranjith <at> qualiantech.com> Date: Thu Jul 13 11:42:37 2017 +0530 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cb08b24b56b58ef9c9998840d4e302041f31b42a [^] Fixed issue 36445 : Validate duplicate listeners in OB Scrollable Table * In OBScrollable table, duplicate listeners should be avoided when component is created multiple times for same model --- M web/org.openbravo.mobile.core/source/component/ob-scrollabletable.js --- |
(0098061) migueldejuana (viewer) 2017-07-13 10:53 |
Tested and reviewed |
![]() |
|||
Date Modified | Username | Field | Change |
2017-07-07 11:37 | malsasua | New Issue | |
2017-07-07 11:37 | malsasua | Assigned To | => Retail |
2017-07-07 11:37 | malsasua | File Added: hookPerformanceProblem.txt | |
2017-07-07 11:37 | malsasua | OBNetwork customer | => Yes |
2017-07-07 11:37 | malsasua | Support ticket | => 47437 |
2017-07-07 11:37 | malsasua | Resolution time | => 1501192800 |
2017-07-07 11:37 | malsasua | Triggers an Emergency Pack | => No |
2017-07-07 11:42 | Practics | Issue Monitored: Practics | |
2017-07-10 15:49 | jmonfort | Issue Monitored: jmonfort | |
2017-07-12 14:17 | ranjith_qualiantech_com | Assigned To | Retail => ranjith_qualiantech_com |
2017-07-12 14:17 | ranjith_qualiantech_com | Status | new => scheduled |
2017-07-13 08:13 | hgbot | Checkin | |
2017-07-13 08:13 | hgbot | Note Added: 0098055 | |
2017-07-13 08:13 | hgbot | Status | scheduled => resolved |
2017-07-13 08:13 | hgbot | Resolution | open => fixed |
2017-07-13 08:13 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cb08b24b56b58ef9c9998840d4e302041f31b42a [^] |
2017-07-13 10:53 | migueldejuana | Review Assigned To | => migueldejuana |
2017-07-13 10:53 | migueldejuana | Note Added: 0098061 | |
2017-07-13 10:53 | migueldejuana | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |