details: https://code.openbravo.com/erp/devel/main/rev/66f8b1c4f69f
changeset: 24005:66f8b1c4f69f
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Fri Aug 01 12:37:37 2014 +0200
summary: fixed bug 27234: fixed auxiliary inputs set by callouts in mode NEW
don't overwrite auxiliary inputs calculated by callouts when in NEW mode
diffstat:
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
| 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (23 lines):
diff -r 2ddb7343d69e -r 66f8b1c4f69f
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
---
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
Wed Jul 30 15:49:15 2014 +0200
+++
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
Fri Aug 01 12:37:37 2014 +0200
@@ -177,7 +177,9 @@
List<String> overwrittenAuxiliaryInputs = new ArrayList<String>();
// The provided overwrittenAuxiliaryInputs only have to be persisted
when calling the FIC in
// CHANGE mode. In the rest of the modes all auxiliary inputs are
computed regardless of
- // whether a callout have modified them in a previous request
+ // whether a callout have modified them in a previous request with the
exception of NEW. In
+ // NEW mode auxiliary inputs are not recomputed if they were previously
calculated by callouts
+ // (within in the same request)
if (jsContent.has("overwrittenAuxiliaryInputs") &&
"CHANGE".equals(mode)) {
overwrittenAuxiliaryInputs = convertJSONArray(jsContent
.getJSONArray("overwrittenAuxiliaryInputs"));
@@ -888,7 +890,7 @@
private void computeAuxiliaryInputs(String mode, Tab tab, Map<String,
JSONObject> columnValues,
List<String> overwrittenAuxiliaryInputs) {
for (AuxiliaryInput auxIn : getAuxiliaryInputList(tab.getId())) {
- if (mode.equals("CHANGE")) {
+ if (mode.equals("CHANGE") || mode.equals("NEW")) {
// Don't compute the auxiliary inputs that have been overwritten by
callouts
if (overwrittenAuxiliaryInputs.contains(auxIn.getName())) {
continue;
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits