com.vaadin.flow.router.AfterNavigationEvent Java Examples

The following examples show how to use com.vaadin.flow.router.AfterNavigationEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LeftSubmenu.java    From vaadin-app-layout with Apache License 2.0 5 votes vote down vote up
@Override
public void afterNavigation(AfterNavigationEvent event) {
    if (active != null) {
        item.getElement().setAttribute("highlight", true);
    } else {
        item.getElement().removeAttribute("highlight");
        if (this.close) {
            getContent().getIronCollapse().hide();
        }
    }
}
 
Example #2
Source File: ViewTestLayout.java    From flow with Apache License 2.0 5 votes vote down vote up
@Override
public void afterNavigation(AfterNavigationEvent event) {
    // Defer value setting until all option elements have been attached
    UI.getCurrent().getPage().executeJs(
            "setTimeout(function() {$0.value = $1}, 0)", viewSelect,
            event.getLocation().getPath());
}
 
Example #3
Source File: RequestParametersHistoryView.java    From flow with Apache License 2.0 5 votes vote down vote up
@Override
public void afterNavigation(AfterNavigationEvent event) {
    List<String> params = event.getLocation().getQueryParameters().getParameters().get(REQUEST_PARAM_NAME);
    if (params == null || params.isEmpty()) {
        requestParamLabel.setText(NO_INPUT_TEXT);
    } else {
        requestParamLabel.setText(params.get(0));
    }
}
 
Example #4
Source File: MainLayout.java    From crudui with Apache License 2.0 4 votes vote down vote up
@Override
public void afterNavigation(AfterNavigationEvent event) {
    updatePageTitle();
    addSourceCodeAnchorToCurrentView();
}
 
Example #5
Source File: AbstractNavigationStateRenderer.java    From flow with Apache License 2.0 4 votes vote down vote up
private void fireAfterNavigationListeners(AfterNavigationEvent event,
        List<AfterNavigationHandler> afterNavigationHandlers) {
    afterNavigationHandlers
            .forEach(listener -> listener.afterNavigation(event));
}
 
Example #6
Source File: UITest.java    From flow with Apache License 2.0 4 votes vote down vote up
@Override
public void afterNavigation(AfterNavigationEvent event) {
}
 
Example #7
Source File: UITest.java    From flow with Apache License 2.0 4 votes vote down vote up
@Override
public void afterNavigation(AfterNavigationEvent event) {
}
 
Example #8
Source File: UITest.java    From flow with Apache License 2.0 4 votes vote down vote up
@Override
public void afterNavigation(AfterNavigationEvent event) {
}
 
Example #9
Source File: ViewWithAllEvents.java    From flow with Apache License 2.0 4 votes vote down vote up
@Override
public void afterNavigation(AfterNavigationEvent event) {
    addLog("4 afterNavigation");
}
 
Example #10
Source File: SetParameterForwardToView.java    From flow with Apache License 2.0 4 votes vote down vote up
@Override
public void afterNavigation(AfterNavigationEvent event) {
    location.setText(event.getLocation().getPath());
    add(location);
}
 
Example #11
Source File: TemplateScalabilityView.java    From flow with Apache License 2.0 4 votes vote down vote up
@Override
public void afterNavigation(AfterNavigationEvent event) {
    generateChildren();
}
 
Example #12
Source File: InitialPageSettings.java    From flow with Apache License 2.0 3 votes vote down vote up
/**
 * Create new initial page settings object.
 *
 * @param request
 *         initial request
 * @param ui
 *         target ui
 * @param afterNavigationEvent
 *         after navigation event
 * @param browser
 *         browser information
 */
public InitialPageSettings(VaadinRequest request, UI ui,
                           AfterNavigationEvent afterNavigationEvent, WebBrowser browser) {
    this.request = request;
    this.ui = ui;
    this.afterNavigationEvent = afterNavigationEvent;
    this.browser = browser;
}
 
Example #13
Source File: InitialPageSettings.java    From flow with Apache License 2.0 2 votes vote down vote up
/**
 * Get the after navigation event.
 *
 * @return the after navigation event
 */
public AfterNavigationEvent getAfterNavigationEvent() {
    return afterNavigationEvent;
}
 
Example #14
Source File: AfterNavigationHandler.java    From flow with Apache License 2.0 2 votes vote down vote up
/**
 * Callback executed after navigation has been executed.
 *
 * @param event
 *            after navigation event with event details
 */
void afterNavigation(AfterNavigationEvent event);