Fixes issue 16796: import bank statement info message
authorMikel Irurita <mikel.irurita@openbravo.com>
Thu, 23 Jun 2011 10:20:37 +0200
changeset 12944 c399ea037d58
parent 12943 76bcb4fc6369
child 12945 df8c19ce8e88
child 12948 5614633d86ea
Fixes issue 16796: import bank statement info message
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ImportBankFile.java
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ImportBankFile.java	Wed Jun 22 23:18:14 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ImportBankFile.java	Thu Jun 23 10:20:37 2011 +0200
@@ -141,11 +141,17 @@
 
     if (isDefault) {
       if (!isAnyFileFormatInstalled) {
-        xmlDocument.setParameter("messageType", "Warning");
-        xmlDocument.setParameter("messageTitle", Utility.messageBD(this,
-            "APRM_NoBankFileAvailable", vars.getLanguage()));
-        xmlDocument.setParameter("messageMessage", Utility.messageBD(this,
-            "APRM_NoBankFileAvailableInfo", vars.getLanguage()));
+        String strWindowPath = Utility.getTabURL(tabId, "R", true);
+        if (strWindowPath.equals(""))
+          strWindowPath = strDefaultServlet;
+        OBError message = new OBError();
+        message.setType("Warning");
+        message.setTitle(Utility.messageBD(this, "APRM_NoBankFileAvailable", vars.getLanguage()));
+        message.setMessage(Utility.messageBD(this, "APRM_NoBankFileAvailableInfo", vars
+            .getLanguage()));
+        vars.setMessage(tabId, message);
+        printPageClosePopUp(response, vars, strWindowPath);
+        return;
       } else {
         xmlDocument.setParameter("messageType", "");
         xmlDocument.setParameter("messageTitle", "");