List of usage examples for com.vaadin.ui Notification show
public static Notification show(String caption, Type type)
From source file:com.mcparland.john.vaadin_mvn_arch.samples.crud.SampleCrudView.java
License:Apache License
public void showError(String msg) { Notification.show(msg, Type.ERROR_MESSAGE); }
From source file:com.mcparland.john.vaadin_mvn_arch.samples.crud.SampleCrudView.java
License:Apache License
public void showSaveNotification(String msg) { Notification.show(msg, Type.TRAY_NOTIFICATION); }
From source file:com.morevaadin.vaadin7.springsecurity.SecuredRoot.java
License:Apache License
@Subscribe public void login(LoginEvent event) { AuthenticationService authHandler = new AuthenticationService(); try {//from w ww.j ava 2s. co m authHandler.handleAuthentication(event.getLogin(), event.getPassword(), RequestHolder.getRequest()); navigator.navigateTo(MAIN_VIEW_NAME); } catch (BadCredentialsException e) { Notification.show("Bad credentials", TYPE_ERROR_MESSAGE); } }
From source file:com.naoset.framework.frontend.view.window.DialogWindow.java
protected void onButtonOKClicked() { Notification.show("OK Button Clicked", Notification.Type.ASSISTIVE_NOTIFICATION); }
From source file:com.naoset.framework.frontend.view.window.DialogWindow.java
protected void onButtonCancelClicked() { Notification.show("CANCEL Button Clicked", Notification.Type.ASSISTIVE_NOTIFICATION); }
From source file:com.naoset.framework.frontend.view.window.DialogWindow.java
protected void onButtonYesClicked() { Notification.show("YES Button Clicked", Notification.Type.ASSISTIVE_NOTIFICATION); }
From source file:com.naoset.framework.frontend.view.window.DialogWindow.java
protected void onButtonNoClicked() { Notification.show("NO Button Clicked", Notification.Type.ASSISTIVE_NOTIFICATION); }
From source file:com.naoset.framework.frontend.view.window.DialogWindow.java
protected void onButtonCloseClicked() { Notification.show("CLOSE Button Clicked", Notification.Type.ASSISTIVE_NOTIFICATION); }
From source file:com.ocs.dynamo.ui.composite.form.ModelBasedEditForm.java
License:Apache License
/** * Constructs the save button/*from w w w . ja v a2 s . co m*/ */ private Button constructSaveButton() { Button saveButton = new Button(message("ocs.save")); saveButton.addClickListener(new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { try { boolean isNew = entity.getId() == null; entity = service.save(entity); setEntity(service.fetchById(entity.getId())); Notification.show(message("ocs.changes.saved"), Notification.Type.TRAY_NOTIFICATION); // set to viewmode, load the view mode screen, and fill the // details if (getFormOptions().isOpenInViewMode()) { viewMode = true; build(); } afterEditDone(false, isNew, getEntity()); } catch (RuntimeException ex) { handleSaveException(ex); } } }); // enable/disable save button based on form validity saveButton.setEnabled(groups.get(isViewMode()).isValid()); for (Field<?> f : groups.get(isViewMode()).getFields()) { f.addValueChangeListener(new Property.ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { checkSaveButtonState(); } }); } return saveButton; }
From source file:com.ocs.dynamo.ui.composite.form.ProgressForm.java
License:Apache License
/** * Locks the UI and displays a notification * //from w w w .j a v a 2 s .c o m * @param message * @param type */ protected void showNotification(String message, Notification.Type type) { getUI().getSession().lock(); try { Notification.show(message, type); } finally { getUI().getSession().unlock(); } }