/** * Display an Error Message in the Application * * @param title * @param message */ public static void errorMessage(String title, String message) { MessageBox box = new MessageBox(); box.setIcon(MessageBox.ERROR); box.setTitleHtml(title); box.setMessage(message); box.show(); }
@Override public void handleEvent(MessageBoxEvent be) { newEntityName = be.getValue(); if (!Utils.isEmptyString(newEntityName)) { final MessageBox box = MessageBox.wait( "Progress", "Creating your data point channel into the cloud", "Creating: " + newEntityName); box.show(); EntityServiceAsync service = GWT.create(EntityService.class); try { Point p = EntityHelper.createPointWithName(newEntityName); service.addUpdateEntity(p, new NewPointEntityAsyncCallback(box)); } catch (NimbitsException caught) { FeedbackHelper.showError(caught); } } }
@Override public void handleEvent(final BaseEvent be) { // final Dialog simple = new Dialog(); // simple.setHeading("); try { final MessageBox box = new MessageBox(); box.setButtons(MessageBox.YESNOCANCEL); box.setIcon(MessageBox.QUESTION); box.setTitle("Connection request approval"); box.addCallback( new ApproveConnectionMessageBoxEventListener(r, scrollMenu, m, connectionRequest)); box.setMessage( "The owner of the email address: '" + r.getRequestorEmail().getValue() + "' would like to connect with you. You will have read only access to each others data points. Is that OK?"); box.show(); } catch (NimbitsException e) { FeedbackHelper.showError(e); } }