List of usage examples for com.vaadin.server Page getCurrent
public static Page getCurrent()
From source file:com.toptal.ui.AuthenticationService.java
License:Open Source License
/** * Logout. */ public void logout() { VaadinSession.getCurrent().close(); Page.getCurrent().reload(); }
From source file:com.toptal.ui.view.LoginView.java
License:Open Source License
/** * Error notification./*w w w. j a v a 2 s .c o m*/ * @param message Message. */ private void error(final String message) { final int delay = 5000; final Notification notification = new Notification(message, Notification.Type.WARNING_MESSAGE); notification.setHtmlContentAllowed(true); notification.setStyleName("closable"); notification.setPosition(Position.BOTTOM_CENTER); notification.setIcon(FontAwesome.WARNING); notification.setDelayMsec(delay); notification.show(Page.getCurrent()); }
From source file:com.trender.user.AddEditStudyView.java
@Override public void activeStepChanged(WizardStepActivationEvent event) { Page.getCurrent().setTitle(event.getActivatedStep().getCaption()); if (event.getWizard().isCompleted(event.getWizard().getSteps().get(1))) { SetupStepWizardStudy obj = (SetupStepWizardStudy) event.getWizard().getSteps().get(1); TextField[] questionField = obj.getQuestionField(); for (int j = 0; j < questionField.length; j++) { System.out.println(questionField[j].getValue()); }/* w ww. j av a 2 s . c o m*/ } if (event.getWizard().isActive(event.getWizard().getSteps().get(event.getWizard().getSteps().size() - 2))) { ListenStepWizardStudy obj = (ListenStepWizardStudy) event.getWizard().getSteps() .get(event.getWizard().getSteps().size() - 2); obj.getThreadProgressBar().start(); getUI().setPollInterval(500); event.getWizard().next(); } }
From source file:com.vaadHL.utl.msgs.Msgs.java
License:Apache License
public void showInfo(String caption, int delay) { Notification not = new Notification(caption); not.setDelayMsec(delay);//from ww w . j a v a 2 s . c o m not.setHtmlContentAllowed(true); not.show(Page.getCurrent()); }
From source file:com.vaadHL.utl.msgs.Msgs.java
License:Apache License
public void showWarning(String caption, int delay) { Notification not = new Notification(caption, Notification.Type.WARNING_MESSAGE); not.setDelayMsec(delay);/*w ww. j av a 2s.c om*/ not.setHtmlContentAllowed(true); not.setCaption(caption); not.show(Page.getCurrent()); }
From source file:com.vaadHL.utl.msgs.Msgs.java
License:Apache License
public void showError(String caption, int delay) { Notification not = new Notification("", Notification.Type.ERROR_MESSAGE); not.setDelayMsec(delay);/*from w w w .ja va2s . c o m*/ not.setHtmlContentAllowed(true); not.setCaption(caption); not.show(Page.getCurrent()); }
From source file:com.vphakala.CustomerUI.java
public void updateCustomer() { if (grid.getSelectedRows().isEmpty()) { new Notification("Update: failed", "<br/>Select a customer to be <i>updated </i>", Notification.Type.HUMANIZED_MESSAGE, true).show(Page.getCurrent()); } else {/*from w w w .j a va 2s .c o m*/ service.update(customer); updateGrid(); } }
From source file:com.vphakala.CustomerUI.java
public void deleteCustomer() { if (grid.getSelectedRows().isEmpty()) { new Notification("Delete: failed", "<br/>Select a customer to be <i>deleted</i>", Notification.Type.HUMANIZED_MESSAGE, true).show(Page.getCurrent()); } else {/* w ww .j a v a2s . c o m*/ customer = (Customer) grid.getSelectedRow(); service.delete(customer); updateGrid(); } }
From source file:com.wcs.wcslib.vaadin.widget.recaptcha.demo.DummyRegWithReCaptcha.java
License:Apache License
private Button createCancelBtn() { return new Button("Cancel", new Button.ClickListener() { @Override// w w w.ja v a2s . co m public void buttonClick(Button.ClickEvent event) { Page.getCurrent().reload(); } }); }
From source file:com.wintindustries.pfserver.interfaces.view.dashboard.FolderView.java
@Override public void enter(ViewChangeListener.ViewChangeEvent event) { // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. if (event.getParameters() == null || event.getParameters().isEmpty()) { this.addComponent(new EmptyView()); return;//w w w .j av a2s .c o m } else { this.loadFolder(event.getParameters()); Notification note = new Notification("Notificaton", event.getParameters().toString(), Notification.Type.TRAY_NOTIFICATION); note.show(Page.getCurrent()); } // event.getParameters())); }