Example usage for com.vaadin.server Page setLocation

List of usage examples for com.vaadin.server Page setLocation

Introduction

In this page you can find the example usage for com.vaadin.server Page setLocation.

Prototype

public void setLocation(URI uri) 

Source Link

Document

Navigates this page to the given URI.

Usage

From source file:org.jdal.vaadin.VaadinUtils.java

License:Apache License

/**
 * Exit application/*from w  ww  .  ja va2s.co  m*/
 */
public static void exit() {
    UI.getCurrent().close();
    VaadinSession.getCurrent().close();
    Page page = Page.getCurrent();
    String location = StringUtils.substringBeforeLast(page.getLocation().toString(), page.getUriFragment());
    location = StringUtils.substringAfterLast(location, "#");
    page.setLocation(location);

}