In my Vaadin 7 MPR code, I have the following from my original Vaadin 7 app:
try {
if( com.vaadin.server.Page.getCurrent() instanceof com.vaadin.server.Page )
{
String uriFragment = com.vaadin.server.Page.getCurrent().getUriFragment();
if( uriFragment != null && !uriFragment.trim().isEmpty() )
{
com.vaadin.server.Page.getCurrent().setUriFragment("", false );
}
}
} catch (Exception e) {
LOGGER.severe( "Error setting URI fragment, Vaadin 7: " + e );
}
How do I do similar actions in Flow? In above case, I am actually just trying to get rid of the path segments, such as “/dashboard”, so it goes back to the root context/starting point. I figure it has something to do with the Location
class, but searching the documents for that did not help much.
Total side note, but the above does nothing in my MPR Vaadin 7 code. It works perfectly in the pure Vaadin 7 app.