details: https://code.openbravo.com/erp/devel/pi/rev/2302c22810c1
changeset: 21250:2302c22810c1
user: Adrián Romero <adrianromero <at> openbravo.com>
date: Wed Oct 09 16:45:41 2013 +0200
summary: Fixes issue 0024799: Extend SimpleCallout to provide utility methods
with actions that can be executed in a callout
This changeset adds several utility methods for messages and other actions in
callouts
diffstat:
src/org/openbravo/erpCommon/ad_callouts/SimpleCallout.java | 99 ++++++++++++++
1 files changed, 99 insertions(+), 0 deletions(-)
diffs (108 lines):
diff -r 1b42e944e4a7 -r 2302c22810c1
src/org/openbravo/erpCommon/ad_callouts/SimpleCallout.java
--- a/src/org/openbravo/erpCommon/ad_callouts/SimpleCallout.java Wed Oct
09 13:11:37 2013 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SimpleCallout.java Wed Oct
09 16:45:41 2013 +0200
@@ -320,5 +320,104 @@
addResult(param, (Object) (value == null ? null : "\"" +
FormatUtilities.replaceJS(value)
+ "\""));
}
+
+ /**
+ * Shows a message in the browser with the value indicated.
+ *
+ * @param value
+ * The message to display in the browser.
+ */
+ public void showMessage(String value) {
+ addResult("MESSAGE", value);
+ }
+
+ /**
+ * Shows an error message in the browser with the value indicated.
+ *
+ * @param value
+ * The error message to display in the browser.
+ */
+ public void showError(String value) {
+ addResult("ERROR", value);
+ }
+
+ /**
+ * Shows a warning message in the browser with the value indicated.
+ *
+ * @param value
+ * The warning message to display in the browser.
+ */
+ public void showWarning(String value) {
+ addResult("WARNING", value);
+ }
+
+ /**
+ * Shows an information message in the browser with the value indicated.
+ *
+ * @param value
+ * The information message to display in the browser.
+ */
+ public void showInformation(String value) {
+ addResult("INFO", value);
+ }
+
+ /**
+ * Shows a success message in the browser with the value indicated.
+ *
+ * @param value
+ * The success message to display in the browser.
+ */
+ public void showSuccess(String value) {
+ addResult("SUCCESS", value);
+ }
+
+ /**
+ * Executes the javascript code indicated in the value in the browser.
+ *
+ * @param value
+ * The javascript code to execute in the browser.
+ */
+ public void executeCode(String value) {
+ addResult("EXECUTE", value);
+ }
+
+ /**
+ * Executes the validation defined by the display logic of window fields
after the execution of
+ * the callout.
+ *
+ */
+ public void executeDisplayLogic() {
+ addResult("EXECUTE", "displayLogic();");
+ }
+
+ /**
+ * Shows the field defined indicated in the value.
+ *
+ * @param value
+ * The field to show.
+ */
+ public void displayElement(String value) {
+ addResult("DISPLAY", value);
+ }
+
+ /**
+ * Hides the field defined indicated in the value.
+ *
+ * @param value
+ * The field to hide.
+ */
+ public void hideElement(String value) {
+ addResult("HIDE", value);
+ }
+
+ /**
+ * Defines the field to put the focus after the execution of the callout.
+ *
+ * @param value
+ * The field to focus.
+ */
+ public void cursorElement(String value) {
+ addResult("CURSOR_FIELD", value);
+ }
}
}
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits