Class WebComponentUI

    • Constructor Detail

      • WebComponentUI

        public WebComponentUI()
    • Method Detail

      • doInit

        public void doInit​(VaadinRequest request,
                           int uiId)
        Description copied from class: UI
        Internal initialization method, should not be overridden. This method is not declared as final because that would break compatibility with e.g. CDI.
        Overrides:
        doInit in class UI
        Parameters:
        request - the initialization request
        uiId - the id of the new ui
        See Also:
        UI.getUIId()
      • isNavigationSupported

        public boolean isNavigationSupported()
        Description copied from class: UI
        Returns true if this UI instance supports navigation.
        Overrides:
        isNavigationSupported in class UI
        Returns:
        true if this UI instance supports navigation, otherwise false.
      • navigate

        public void navigate​(String location)
        Description copied from class: UI
        Updates this UI to show the view corresponding to the given location. The location must be a relative path without any ".." segments.

        Besides the navigation to the location this method also updates the browser location (and page history).

        Overrides:
        navigate in class UI
        Parameters:
        location - the location to navigate to, not null
        See Also:
        UI.navigate(String, QueryParameters), Router.navigate(UI, Location, NavigationTrigger)
      • navigate

        public void navigate​(Class<? extends Component> navigationTarget)
        Description copied from class: UI
        Updates this UI to show the view corresponding to the given navigation target.

        Besides the navigation to the location this method also updates the browser location (and page history).

        Overrides:
        navigate in class UI
        Parameters:
        navigationTarget - navigation target to navigate to
        See Also:
        UI.navigate(Class, Object), UI.navigate(Class, RouteParameters)
      • navigate

        public <T,​C extends Component & HasUrlParameter<T>> void navigate​(Class<? extends C> navigationTarget,
                                                                                T parameter)
        Description copied from class: UI
        Updates this UI to show the view corresponding to the given navigation target with the specified parameter. The parameter needs to be the same as defined in the route target HasUrlParameter.

        Besides the navigation to the location this method also updates the browser location (and page history).

        Note! A null parameter will be handled the same as navigate(navigationTarget) and will throw an exception if HasUrlParameter is not @OptionalParameter or @WildcardParameter.

        Overrides:
        navigate in class UI
        Type Parameters:
        T - url parameter type
        C - navigation target type
        Parameters:
        navigationTarget - navigation target to navigate to
        parameter - parameter to pass to view
      • navigate

        public void navigate​(String location,
                             QueryParameters queryParameters)
        Description copied from class: UI
        Updates this UI to show the view corresponding to the given location and query parameters. The location must be a relative path without any ".." segments.

        Besides the navigation to the location this method also updates the browser location (and page history).

        Overrides:
        navigate in class UI
        Parameters:
        location - the location to navigate to, not null
        queryParameters - query parameters that are used for navigation, not null
        See Also:
        UI.navigate(String), Router.navigate(UI, Location, NavigationTrigger)