com.vaadin.flow.component.webcomponent.
Class WebComponentUI
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.UI
-
- com.vaadin.flow.component.webcomponent.WebComponentUI
-
All Implemented Interfaces:
AttachNotifier
,DetachNotifier
,HasComponents
,HasElement
,HasEnabled
,PollNotifier
,RouterLayout
,Serializable
public class WebComponentUI extends UI
Custom UI for use with WebComponents served from the server.
For internal use only. May be renamed or removed in a future release.
Since:
2.0
Author:
Vaadin Ltd.
See Also:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WebComponentUI.WebComponentConnectEvent
Event used for sending the activation event for an exported web component from the client to the server.
-
Field Summary
Fields Modifier and Type Field Description static String
NO_NAVIGATION
-
Constructor Summary
Constructors Constructor Description WebComponentUI()
-
Method Summary
All Methods Modifier and Type Method Description void
doInit(VaadinRequest request, int uiId)
Internal initialization method, should not be overridden.
boolean
isNavigationSupported()
Returns true if this UI instance supports navigation.
<T,C extends Component & HasUrlParameter<T>>
voidnavigate(Class<? extends C> navigationTarget, T parameter)
Updates this UI to show the view corresponding to the given navigation target with the specified parameter.
void
navigate(Class<? extends Component> navigationTarget)
Updates this UI to show the view corresponding to the given navigation target.
void
navigate(String location)
Updates this UI to show the view corresponding to the given location.
void
navigate(String location, QueryParameters queryParameters)
Updates this UI to show the view corresponding to the given location and query parameters.
-
Methods inherited from class com.vaadin.flow.component.UI
access, accessLater, accessLater, accessSynchronously, add, addAfterNavigationListener, addBeforeEnterListener, addBeforeLeaveListener, addHeartbeatListener, addModal, addShortcutListener, addShortcutListener, addToModalComponent, beforeClientResponse, close, getActiveDragSourceComponent, getCsrfToken, getCurrent, getElement, getInternals, getLoadingIndicatorConfiguration, getLocale, getNavigationListeners, getPage, getPollInterval, getPushConfiguration, getReconnectDialogConfiguration, getRouter, getSession, getUI, getUIId, hasModalComponent, init, isClosing, navigate, onAttach, onDetach, push, setChildComponentModal, setCurrent, setDirection, setLocale, setPollInterval
-
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, getChildren, getEventBus, getId, getParent, getTranslation, getTranslation, getTranslation, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, scrollIntoView, set, setElement, setId, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
-
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
-
Methods inherited from interface com.vaadin.flow.component.HasComponents
add, addComponentAsFirst, addComponentAtIndex, remove, removeAll
-
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
-
Methods inherited from interface com.vaadin.flow.component.PollNotifier
addPollListener
-
Methods inherited from interface com.vaadin.flow.router.RouterLayout
removeRouterLayoutContent, showRouterLayoutContent
-
-
-
-
Field Detail
-
NO_NAVIGATION
public static final String NO_NAVIGATION
See Also:
-
-
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:
Parameters:
request
- the initialization requestuiId
- the id of the new uiSee Also:
-
isNavigationSupported
public boolean isNavigationSupported()
Description copied from class:
UI
Returns true if this UI instance supports navigation.
Overrides:
isNavigationSupported
in classUI
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:
Parameters:
location
- the location to navigate to, notnull
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:
Parameters:
navigationTarget
- navigation target to navigate toSee 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.
-
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:
Parameters:
location
- the location to navigate to, notnull
queryParameters
- query parameters that are used for navigation, notnull
See Also:
UI.navigate(String)
,Router.navigate(UI, Location, NavigationTrigger)
-
-