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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWebComponentUI.WebComponentConnectEventEvent 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 StringNO_NAVIGATION
-
Constructor Summary
Constructors Constructor Description WebComponentUI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoInit(VaadinRequest request, int uiId)Internal initialization method, should not be overridden.booleanisNavigationSupported()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.voidnavigate(Class<? extends Component> navigationTarget)Updates this UI to show the view corresponding to the given navigation target.voidnavigate(String location)Updates this UI to show the view corresponding to the given location.voidnavigate(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, 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:
- Constant Field Values
-
-
Method Detail
-
doInit
public void doInit(VaadinRequest request, int uiId)
Description copied from class:UIInternal initialization method, should not be overridden. This method is not declared as final because that would break compatibility with e.g. CDI.- Overrides:
doInitin classUI- Parameters:
request- the initialization requestuiId- the id of the new ui- See Also:
UI.getUIId()
-
isNavigationSupported
public boolean isNavigationSupported()
Description copied from class:UIReturns true if this UI instance supports navigation.- Overrides:
isNavigationSupportedin classUI- Returns:
- true if this UI instance supports navigation, otherwise false.
-
navigate
public void navigate(String location)
Description copied from class:UIUpdates 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
locationthis method also updates the browser location (and page history).- Overrides:
navigatein classUI- 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:UIUpdates this UI to show the view corresponding to the given navigation target.Besides the navigation to the
locationthis method also updates the browser location (and page history).- Overrides:
navigatein classUI- 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:UIUpdates 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
locationthis method also updates the browser location (and page history).Note! A
nullparameter 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:UIUpdates 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
locationthis method also updates the browser location (and page history).- Overrides:
navigatein classUI- Parameters:
location- the location to navigate to, notnullqueryParameters- query parameters that are used for navigation, notnull- See Also:
UI.navigate(String),Router.navigate(UI, Location, NavigationTrigger)
-
-