details:   https://code.openbravo.com/erp/devel/pi/rev/9f9a22f6dd90
changeset: 34847:9f9a22f6dd90
user:      Carlos Aristu <carlos.aristu <at> openbravo.com>
date:      Wed Oct 17 13:12:31 2018 +0200
summary:   related to issue 39459: allow to define a retry execution message 
with a title

diffstat:

 
modules/org.openbravo.client.application/src/org/openbravo/client/application/process/ResponseActionsBuilder.java
 |  26 ++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diffs (36 lines):

diff -r 6166413117d8 -r 9f9a22f6dd90 
modules/org.openbravo.client.application/src/org/openbravo/client/application/process/ResponseActionsBuilder.java
--- 
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/process/ResponseActionsBuilder.java
 Wed Oct 17 13:01:48 2018 +0200
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/process/ResponseActionsBuilder.java
 Wed Oct 17 13:12:31 2018 +0200
@@ -274,6 +274,32 @@
   }
 
   /**
+   * Allows to re-execute the process again, by enabling the process UI. This 
is useful to do
+   * backend validations as this allows the user to fix data and resubmit 
again. In addition, a
+   * message will be displayed with the severity, title and text specified 
with the parameters of
+   * this method.
+   *
+   * @param msgType
+   *          The message type.
+   * @param msgTitle
+   *          The title of the message.
+   * @param msgText
+   *          The text of the message.
+   * @return a ResponseActionsBuilder configured to retry the process 
execution.
+   */
+  public ResponseActionsBuilder retryExecution(MessageType msgType, String 
msgTitle, String msgText) {
+    try {
+      retryExecution = true;
+      retryExecutionMsg = new JSONObject();
+      retryExecutionMsg.put("severity", msgType.getType());
+      retryExecutionMsg.put("title", msgTitle);
+      retryExecutionMsg.put("text", msgText);
+    } catch (JSONException ignore) {
+    }
+    return this;
+  }
+
+  /**
    * Allows to configure the response to show the result of a process directly 
in the process window
    * itself.
    * 


_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to