details:   https://code.openbravo.com/erp/devel/pi/rev/a1768a7c3d9e
changeset: 13278:a1768a7c3d9e
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Tue Jul 26 16:51:21 2011 +0200
summary:   issue 15262: Copy lines button incorrect message

diffstat:

 src-db/database/sourcedata/AD_MESSAGE.xml                      |  11 ---------
 src/org/openbravo/base/secureApp/HttpSecureAppServlet.java     |   8 +-----
 src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java |  12 ++++++++-
 3 files changed, 12 insertions(+), 19 deletions(-)

diffs (72 lines):

diff -r 5aab4f80753e -r a1768a7c3d9e src-db/database/sourcedata/AD_MESSAGE.xml
--- a/src-db/database/sourcedata/AD_MESSAGE.xml Tue Jul 26 16:33:51 2011 +0200
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml Tue Jul 26 16:51:21 2011 +0200
@@ -16581,17 +16581,6 @@
 <!--69214D1297AF46B398BC55D7C7517EF4-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--69214D1297AF46B398BC55D7C7517EF4--></AD_MESSAGE>
 
-<!--6A62F2C09137428DA9CA0EB59B18F667--><AD_MESSAGE>
-<!--6A62F2C09137428DA9CA0EB59B18F667-->  
<AD_MESSAGE_ID><![CDATA[6A62F2C09137428DA9CA0EB59B18F667]]></AD_MESSAGE_ID>
-<!--6A62F2C09137428DA9CA0EB59B18F667-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--6A62F2C09137428DA9CA0EB59B18F667-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--6A62F2C09137428DA9CA0EB59B18F667-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--6A62F2C09137428DA9CA0EB59B18F667-->  <VALUE><![CDATA[EmptyLines]]></VALUE>
-<!--6A62F2C09137428DA9CA0EB59B18F667-->  <MSGTEXT><![CDATA[You have not filled 
in all needed fields]]></MSGTEXT>
-<!--6A62F2C09137428DA9CA0EB59B18F667-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
-<!--6A62F2C09137428DA9CA0EB59B18F667-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--6A62F2C09137428DA9CA0EB59B18F667--></AD_MESSAGE>
-
 <!--6AFF7D5F89EF4A92980112A343CE5687--><AD_MESSAGE>
 <!--6AFF7D5F89EF4A92980112A343CE5687-->  
<AD_MESSAGE_ID><![CDATA[6AFF7D5F89EF4A92980112A343CE5687]]></AD_MESSAGE_ID>
 <!--6AFF7D5F89EF4A92980112A343CE5687-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff -r 5aab4f80753e -r a1768a7c3d9e 
src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
--- a/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java        Tue Jul 
26 16:33:51 2011 +0200
+++ b/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java        Tue Jul 
26 16:51:21 2011 +0200
@@ -438,12 +438,8 @@
     } catch (final ServletException ex) {
       log4j.error("Error captured: ", ex);
       final VariablesSecureApp vars1 = new VariablesSecureApp(request, false);
-      final OBError myError;
-      if (ex.getMessage().equals("Request IN parameter required: 
inpRownumId")) {
-        myError = Utility.translateError(this, vars1, variables.getLanguage(), 
"@EmptyLines@");
-      } else {
-        myError = Utility.translateError(this, vars1, variables.getLanguage(), 
ex.getMessage());
-      }
+      final OBError myError = Utility.translateError(this, vars1, 
variables.getLanguage(),
+          ex.getMessage());
       if (strAjax != null && !strAjax.equals(""))
         bdErrorAjax(response, myError.getType(), myError.getTitle(), 
myError.getMessage());
       else if (strHidden != null && !strHidden.equals(""))
diff -r 5aab4f80753e -r a1768a7c3d9e 
src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java
--- a/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java    Tue Jul 
26 16:33:51 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java    Tue Jul 
26 16:51:21 2011 +0200
@@ -32,10 +32,12 @@
 import org.openbravo.base.filter.IsPositiveIntFilter;
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.dal.core.OBContext;
 import org.openbravo.erpCommon.utility.DateTimeData;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.SequenceIdData;
 import org.openbravo.erpCommon.utility.Utility;
+import org.openbravo.service.db.DalConnectionProvider;
 import org.openbravo.utils.Replace;
 import org.openbravo.xmlEngine.XmlDocument;
 
@@ -62,8 +64,14 @@
       printPageDataSheet(response, vars, strKey, strWindowId, strTabId, 
strSOTrx, strBpartner,
           strmPricelistId);
     } else if (vars.commandIn("SAVE")) {
-      String strRownum = vars.getRequiredInStringParameter("inpRownumId",
-          IsPositiveIntFilter.instance);
+      String strRownum = null;
+      try {
+        strRownum = vars.getRequiredInStringParameter("inpRownumId", 
IsPositiveIntFilter.instance);
+      } catch (ServletException e) {
+        log4j.error("Error captured: ", e);
+        throw new ServletException(Utility.messageBD(new 
DalConnectionProvider(), "@JS1@",
+            OBContext.getOBContext().getLanguage().getLanguage()));
+      }
       String strKey = vars.getRequiredStringParameter("inpcOrderId");
       String strWindowId = vars.getStringParameter("inpWindowId");
       String strSOTrx = vars.getStringParameter("inpissotrx");

------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to