Fixes issue 21647: Fields are still readonly after switching between tabs
authorAugusto Mauch <augusto.mauch@openbravo.com>
Mon, 17 Sep 2012 16:39:03 +0200
changeset 17967 7c3050fc5c15
parent 17966 3add0cfef5fa
child 17968 e3a5ae024381
Fixes issue 21647: Fields are still readonly after switching between tabs

The data._readonly property was only being set when the FIC was called in EDIT mode, but not in CHANGE mode, that is used when the user switches between tabs.
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Mon Sep 17 13:27:00 2012 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Mon Sep 17 16:39:03 2012 +0200
@@ -446,7 +446,7 @@
         finalObject.put("dynamicCols", new JSONArray(changeEventCols));
       }
 
-      if (mode.equals("EDIT") && row != null) {
+      if ((mode.equals("EDIT") || mode.equals("CHANGE")) && row != null) {
         if ((row instanceof ClientEnabled && ((ClientEnabled) row).getClient() != null)) {
           final String rowClientId = ((ClientEnabled) row).getClient().getId();
           final String currentClientId = OBContext.getOBContext().getCurrentClient().getId();