details:   https://code.openbravo.com/erp/devel/pi/rev/fceec837bb81
changeset: 21426:fceec837bb81
user:      Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date:      Thu Nov 07 22:01:27 2013 +0530
summary:   Fixes Issue 0025104: Error when trying to personalize form

Proper comparison is done on getValue before fetching focus item value.

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
 |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r cd5e1a38c069 -r fceec837bb81 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
     Thu Nov 07 13:23:04 2013 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
     Thu Nov 07 22:01:27 2013 +0530
@@ -1944,11 +1944,13 @@
     var focusItemValue;
     this._isRedrawing = true;
     //fetch the focus item value as it is lost sometimes during reflow. Refer 
issue https://issues.openbravo.com/view.php?id=24960
-    focusItemValue = this.getFocusItem() !== null ? 
this.getFocusItem().getValue() : null;
+    if (this.getFocusItem() && this.getFocusItem().getValue) {
+      focusItemValue = this.getFocusItem().getValue();
+    }
     this.Super('redraw', arguments);
     delete this._isRedrawing;
     //reset focus item value if lost
-    if (focusItemValue !== null && this.getFocusItem() !== null && 
this.getFocusItem().getValue() !== focusItemValue) {
+    if (focusItemValue && this.getFocusItem() && 
this.getFocusItem().getValue() !== focusItemValue) {
       this.getFocusItem().setValue(focusItemValue);
     }
     if (this.selectOnFocusStored) {

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to