details: https://code.openbravo.com/erp/devel/pi/rev/d718bd8df867 changeset: 18249:d718bd8df867 user: Martin Taal <martin.taal <at> openbravo.com> date: Thu Oct 18 16:10:05 2012 +0200 summary: Related to issue 21987: Implement grouping, multi-select filtering and summary functions Check several client.application fields for module not in development
details: https://code.openbravo.com/erp/devel/pi/rev/9c2c07e720f8 changeset: 18250:9c2c07e720f8 user: Martin Taal <martin.taal <at> openbravo.com> date: Thu Oct 18 16:12:07 2012 +0200 summary: Related to issue 21987: Implement grouping, multi-select filtering and summary functions Select clause was sometime empty when doing direct navigation details: https://code.openbravo.com/erp/devel/pi/rev/24c8d830a0b8 changeset: 18251:24c8d830a0b8 user: Martin Taal <martin.taal <at> openbravo.com> date: Thu Oct 18 16:16:44 2012 +0200 summary: Related to issue 21987: Implement grouping, multi-select filtering and summary functions Prevent side effects when multiple data requests are done in parallel diffstat: modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_AD_FIELD_MOD_TRG.xml | 62 ++++++++++ modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js | 4 +- modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java | 1 - 3 files changed, 65 insertions(+), 2 deletions(-) diffs (98 lines): diff -r f4bd2575f143 -r 24c8d830a0b8 modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_AD_FIELD_MOD_TRG.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_AD_FIELD_MOD_TRG.xml Thu Oct 18 16:16:44 2012 +0200 @@ -0,0 +1,62 @@ +<?xml version="1.0"?> + <database name="TRIGGER OBUIAPP_AD_FIELD_MOD_TRG"> + <trigger name="OBUIAPP_AD_FIELD_MOD_TRG" table="AD_FIELD" fires="before" insert="true" update="true" delete="true" foreach="row"> + <body><![CDATA[ + +/************************************************************************* +* The contents of this file are subject to the Openbravo Public License +* Version 1.1 (the "License"), being the Mozilla Public License +* Version 1.1 with a permitted attribution clause; you may not use this +* file except in compliance with the License. You may obtain a copy of +* the License at http://www.openbravo.com/legal/license.html +* Software distributed under the License is distributed on an "AS IS" +* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +* License for the specific language governing rights and limitations +* under the License. +* The Original Code is Openbravo ERP. +* The Initial Developer of the Original Code is Openbravo SLU +* All portions are Copyright (C) 2012 Openbravo SLU +* All Rights Reserved. +* Contributor(s): ______________________________________. +************************************************************************/ + devTemplate NUMBER; + devModule CHAR(1); + cuerrentModuleID VARCHAR2(32); + vAux NUMBER; + +BEGIN + + IF AD_isTriggerEnabled()='N' THEN RETURN; + END IF; + + SELECT COUNT(*) + INTO devTemplate + FROM AD_MODULE + WHERE IsInDevelopment = 'Y' + AND Type = 'T'; + + IF (UPDATING OR INSERTING) THEN + cuerrentModuleID := :new.AD_Module_ID; + ELSE + cuerrentModuleID := :old.AD_Module_ID; + END IF; + + SELECT M.IsInDevelopment + INTO devModule + FROM AD_MODULE M + WHERE M.AD_MODULE_ID = cuerrentModuleID; + + IF (UPDATING AND devTemplate=0 AND devModule='N') THEN + IF ( + COALESCE(:NEW.EM_OBUIAPP_ROWSPAN , 1) != COALESCE(:OLD.EM_OBUIAPP_ROWSPAN , 1) OR + COALESCE(:NEW.EM_OBUIAPP_VALIDATOR , '.') != COALESCE(:OLD.EM_OBUIAPP_VALIDATOR , '.') OR + COALESCE(:NEW.EM_OBUIAPP_SHOWSUMMARY , '.') != COALESCE(:OLD.EM_OBUIAPP_SHOWSUMMARY , '.') OR + COALESCE(:NEW.EM_OBUIAPP_SUMMARYFN , '.') != COALESCE(:OLD.EM_OBUIAPP_SUMMARYFN , '.') OR + 1=2) THEN + RAISE_APPLICATION_ERROR(-20000, '@20532@'); + END IF; + END IF; +END OBUIAPP_AD_FIELD_MOD_TRG +]]></body> + </trigger> + </database> diff -r f4bd2575f143 -r 24c8d830a0b8 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js Thu Oct 18 15:14:19 2012 +0200 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js Thu Oct 18 16:16:44 2012 +0200 @@ -202,7 +202,8 @@ // overridden to update the context/request properties for the fetch fetchRemoteData: function (serverCriteria, startRow, endRow) { - var requestProperties = this.context; + // clone to prevent side effects + var requestProperties = isc.clone(this.context); this.grid.getFetchRequestParams(requestProperties.params); return this.Super('fetchRemoteData', arguments); @@ -975,6 +976,7 @@ setViewState: function (state) { var localState, i, fld, hasSummaryFunction; + localState = this.evalViewState(state, 'viewState'); // strange case, sometimes need to call twice diff -r f4bd2575f143 -r 24c8d830a0b8 modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java --- a/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java Thu Oct 18 15:14:19 2012 +0200 +++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java Thu Oct 18 16:16:44 2012 +0200 @@ -1417,7 +1417,6 @@ orderByClause = null; joinDefinitions.clear(); typedParameters.clear(); - selectClauseParts.clear(); } public void addSelectFunctionPart(String function, String field) { ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits