on 2018 Dec 26 8:47 AM
Hi experts,
I had created an interceptor for product validation for backoffice. Can anyone help me on how to display error message in popup or is there any wiki link to implement the same?
Request clarification before answering.
You could try this
public class TextAction implements CockpitAction<?, String>
protected void showErrorMessagebox(String messageLabel, ActionContext<? extends Object> ctx, final ActionResult<String> result, Exception ce, Object[] params) {
String message = params == null ? ctx.getLabel(messageLabel) : ctx.getLabel(messageLabel, params);
if (message == null) {
message = messageLabel;
}
if (ce != null) {
getLogger().warn(message + " " + ce.getMessage(), ce);
} else {
getLogger().warn(message);
}
result.setResultMessage(message);
Messagebox.show(result.getResultMessage(), ctx.getLabel(MESSAGEBOX_TITLE_ERROR), Messagebox.OK, Messagebox.ERROR);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.