details: https://code.openbravo.com/erp/devel/pi/rev/5f508cf9d5ce
changeset: 23880:5f508cf9d5ce
user: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date: Wed Jun 25 16:27:13 2014 +0530
summary: Fixes Issue 26734: Business Partner selector stops working in
Financial Account window
The data to be fetched in the selector item is not paginated in some cases in
2.50 UI selectors.
In this case, the pagination parameters are set from the client side.
In the cases other than selectors in 2.50 mode, error is thrown from server
side.
diffstat:
modules/org.openbravo.service.datasource/web/org.openbravo.service.datasource/js/ob-datasource-utilities.js
| 11 ++++++++++
modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
| 5 ++-
2 files changed, 14 insertions(+), 2 deletions(-)
diffs (43 lines):
diff -r c016b282ca61 -r 5f508cf9d5ce
modules/org.openbravo.service.datasource/web/org.openbravo.service.datasource/js/ob-datasource-utilities.js
---
a/modules/org.openbravo.service.datasource/web/org.openbravo.service.datasource/js/ob-datasource-utilities.js
Wed Jun 25 16:46:12 2014 -0500
+++
b/modules/org.openbravo.service.datasource/web/org.openbravo.service.datasource/js/ob-datasource-utilities.js
Wed Jun 25 16:27:13 2014 +0530
@@ -188,6 +188,17 @@
if (dsRequest.params && this.requestProperties &&
this.requestProperties.params) {
isc.addProperties(dsRequest.params, this.requestProperties.params);
}
+ // if the datasource is not paginated, paginate them in case of selectors
working in 2.50 UI.
+ // in other cases error is thrown from server side.
+ // refer issue https://issues.openbravo.com/view.php?id=26734
+ if (dsRequest.componentId === 'isc_OBSelectorWidget_0') {
+ if (dsRequest.startRow === undefined) {
+ dsRequest.startRow = 0;
+ }
+ if (dsRequest.endRow === undefined) {
+ dsRequest.endRow = 75;
+ }
+ }
this.Super('sendDSRequest', arguments);
},
diff -r c016b282ca61 -r 5f508cf9d5ce
modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
---
a/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
Wed Jun 25 16:46:12 2014 -0500
+++
b/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
Wed Jun 25 16:27:13 2014 +0530
@@ -44,6 +44,7 @@
import org.openbravo.database.SessionInfo;
import org.openbravo.erpCommon.utility.OBMessageUtils;
import org.openbravo.service.json.JsonToDataConverter.JsonConversionError;
+import org.openbravo.userinterface.selector.SelectorConstants;
/**
* Implements generic data operations which have parameters and json as an
input and return results
@@ -393,8 +394,8 @@
log.warn("Fetching data without pagination, this can cause perfomance
issues. Parameters: "
+ paramMsg);
- if (parameters.containsKey(JsonConstants.TAB_PARAMETER)) {
- // ||
parameters.containsKey(SelectorConstants.DS_REQUEST_SELECTOR_ID_PARAMETER)) {
+ if (parameters.containsKey(JsonConstants.TAB_PARAMETER)
+ ||
parameters.containsKey(SelectorConstants.DS_REQUEST_SELECTOR_ID_PARAMETER)) {
// FIXME: Some selectors working in 2.50 windows are incorrectly
unpaged (see issue #26734)
// for now we are not preventing unpaged selector requests till this
issue is properly fixed
// after that they should be prevented again
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits