details:   /erp/devel/pi/rev/7cb3ab3f3572
changeset: 11932:7cb3ab3f3572
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Wed May 04 13:46:16 2011 +0200
summary:   Prevent unnecessary warning

details:   /erp/devel/pi/rev/c829731f40b9
changeset: 11933:c829731f40b9
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Wed May 04 13:37:34 2011 +0200
summary:   Fixes issue 16999: Lots of slow datasource (create) requests on 
accessing sales invoice on first time

details:   /erp/devel/pi/rev/975f3bd4e8dc
changeset: 11934:975f3bd4e8dc
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Wed May 04 13:37:46 2011 +0200
summary:   Fixes issue 16999: Lots of slow datasource (create) requests on 
accessing sales invoice on first time

details:   /erp/devel/pi/rev/1398bf486a83
changeset: 11935:1398bf486a83
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Wed May 04 13:38:27 2011 +0200
summary:   removed selecting of text in grid

diffstat:

 
modules/org.openbravo.client.application/src/org/openbravo/client/application/MainLayoutComponent.java
 |  18 ++++++++++
 
modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/layout.js.ftl
  |   2 +
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
            |   1 -
 
modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceConstants.java
 |   2 +
 src/org/openbravo/base/model/Property.java                                     
                        |   4 +-
 5 files changed, 25 insertions(+), 2 deletions(-)

diffs (106 lines):

diff -r 459eab5f575c -r 1398bf486a83 
modules/org.openbravo.client.application/src/org/openbravo/client/application/MainLayoutComponent.java
--- 
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/MainLayoutComponent.java
    Wed May 04 13:04:53 2011 +0200
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/MainLayoutComponent.java
    Wed May 04 13:38:27 2011 +0200
@@ -20,7 +20,9 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import javax.inject.Inject;
 
@@ -29,6 +31,8 @@
 import org.openbravo.base.weld.WeldUtils;
 import org.openbravo.client.kernel.BaseComponent;
 import org.openbravo.client.kernel.BaseTemplateComponent;
+import org.openbravo.client.kernel.Component;
+import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.client.kernel.Template;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
@@ -36,6 +40,7 @@
 import org.openbravo.erpCommon.businessUtility.Preferences;
 import org.openbravo.erpCommon.obps.ActivationKey;
 import org.openbravo.erpCommon.utility.PropertyException;
+import org.openbravo.service.datasource.DataSourceConstants;
 
 /**
  * 
@@ -46,6 +51,10 @@
   @Inject
   private WeldUtils weldUtils;
 
+  @Inject
+  @ComponentProvider.Qualifier(DataSourceConstants.DS_COMPONENT_TYPE)
+  private ComponentProvider dsComponentProvider;
+
   /*
    * (non-Javadoc)
    * 
@@ -145,6 +154,15 @@
     }
   }
 
+  public String getNotesDataSource() {
+    final String dsId = "090A37D22E61FE94012E621729090048";
+    final Map<String, Object> dsParameters = new HashMap<String, 
Object>(getParameters());
+    dsParameters.put(DataSourceConstants.DS_CREATE, true);
+    dsParameters.put(DataSourceConstants.DS_CLASS_NAME, "OBViewDataSource");
+    final Component component = dsComponentProvider.getComponent(dsId, 
dsParameters);
+    return component.generate();
+  }
+
   public static class NBComponent {
     // NB stands for: Navigation Bar
     private String jscode;
diff -r 459eab5f575c -r 1398bf486a83 
modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/layout.js.ftl
--- 
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/layout.js.ftl
     Wed May 04 13:04:53 2011 +0200
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/layout.js.ftl
     Wed May 04 13:38:27 2011 +0200
@@ -134,6 +134,8 @@
 ${nbc.jscode}<#if nbc_has_next>,</#if>
 </#list>]);
 
+${data.notesDataSource}
+
 // test to see if we can show the heartbeat or registration popups (or not)
 (function _OB_checkHeartBeatRegistration() {
  var handleReturn = function(response, data, request) {
diff -r 459eab5f575c -r 1398bf486a83 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
       Wed May 04 13:04:53 2011 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
       Wed May 04 13:38:27 2011 +0200
@@ -28,7 +28,6 @@
   recordComponentPosition: 'within',
   poolComponentsPerColumn: true,
   showRecordComponents: true,
-  canSelectText: true,
   escapeHTML: true,
   
   createRecordComponent: function(record, colNum){
diff -r 459eab5f575c -r 1398bf486a83 
modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceConstants.java
--- 
a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceConstants.java
    Wed May 04 13:04:53 2011 +0200
+++ 
b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceConstants.java
    Wed May 04 13:38:27 2011 +0200
@@ -35,6 +35,8 @@
 
   public static final String DS_COMPONENT_TYPE = "OBSERDS_Datasource";
 
+  public static final String DS_CREATE = "_create";
+
   public static final String DS_ONLY_GENERATE_CREATESTATEMENT = 
"_onlyGenerateCreateStatement";
 
   public static final String DS_CLASS_NAME = "_className";
diff -r 459eab5f575c -r 1398bf486a83 src/org/openbravo/base/model/Property.java
--- a/src/org/openbravo/base/model/Property.java        Wed May 04 13:04:53 
2011 +0200
+++ b/src/org/openbravo/base/model/Property.java        Wed May 04 13:38:27 
2011 +0200
@@ -1126,7 +1126,9 @@
           break;
         }
       }
-      log.warn("Display column for property " + this + " not found");
+      if (displayProperty == null) {
+        log.warn("Display column for property " + this + " not found");
+      }
     }
     return displayProperty;
   }

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to