details: https://code.openbravo.com/erp/devel/pi/rev/0043e948d053
changeset: 23856:0043e948d053
user: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date: Mon Jun 23 15:59:11 2014 +0530
summary: Fixes Issue 26838: Unpaged request in Financial Account Transaction
Perform form refresh after completing button action only if current form is
valid.
In the issue, we are deleting the record using the button, so the form present
after the delete action is invalid
resulting in fetch with incorrect critieria to the server.
The problems happens only in form view, as refresh grid is done with proper
criteria.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
| 7 ++++++-
modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
| 5 +++--
2 files changed, 9 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r ae57ca1f99dc -r 0043e948d053
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
Fri Jun 20 15:52:00 2014 +0000
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
Mon Jun 23 15:59:11 2014 +0530
@@ -1903,7 +1903,12 @@
if (refreshCallback) {
refreshCallback();
}
- me.viewForm.refresh();
+ // only perform refresh if the viewForm has a valid record.
+ // else a request is not done with incomplete criteria which results in
non paginated request.
+ // Refer issue https://issues.openbravo.com/view.php?id=26838
+ if (me.viewForm.getValues()[OB.Constants.ID]) {
+ me.viewForm.refresh();
+ }
};
if (!newRecordsToBeIncluded) {
diff -r ae57ca1f99dc -r 0043e948d053
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
Fri Jun 20 15:52:00 2014 +0000
+++
b/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
Mon Jun 23 15:59:11 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
@@ -371,8 +372,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
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits