Retrive the CAN_MAXIMIZE property from the superclass if it exists.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Tue, 14 Dec 2010 14:09:37 +0100
changeset 9123 8f494397e400
parent 9122 d136f72b2a64
child 9124 543120570dec
Retrive the CAN_MAXIMIZE property from the superclass if it exists.
modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java
--- a/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java	Tue Dec 14 13:56:33 2010 +0100
+++ b/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java	Tue Dec 14 14:09:37 2010 +0100
@@ -96,7 +96,11 @@
           .getClientSideWidgetClassName());
       jsonObject.put(TITLE, MyOBUtils.getWidgetTitle(widgetClass));
       jsonObject.put(HEIGHT, widgetClass.getHeight());
-      jsonObject.put(CAN_MAXIMIZE, widgetClass.isCanMaximize());
+      if (widgetClass.getWidgetSuperclass() != null) {
+        jsonObject.put(CAN_MAXIMIZE, widgetClass.getWidgetSuperclass().isCanMaximize());
+      } else {
+        jsonObject.put(CAN_MAXIMIZE, widgetClass.isCanMaximize());
+      }
       final JSONObject defaultParameters = new JSONObject();
       final List<JSONObject> fieldDefinitions = new ArrayList<JSONObject>();
       for (Parameter parameter : widgetClass.getOBUIAPPParameterEMObkmoWidgetClassIDList()) {