public class WebComponentUI extends UI
| Modifier and Type | Field and Description |
|---|---|
static String |
NO_NAVIGATION |
| Constructor and Description |
|---|
WebComponentUI() |
| Modifier and Type | Method and Description |
|---|---|
void |
connectWebComponent(String tag,
String webComponentElementId,
elemental.json.JsonObject attributeJson)
Connect a client side web component element with a server side
Component that's added as a virtual child to the UI as the actual
relation of the elements is unknown. |
void |
doInit(VaadinRequest request,
int uiId)
Internal initialization method, should not be overridden.
|
Router |
getRouter()
Gets the router used for navigating in this UI.
|
Optional<ThemeDefinition> |
getThemeFor(Class<?> navigationTarget,
String path)
Gets the
ThemeDefinition associated with the given navigation
target, if any. |
<T,C extends Component & HasUrlParameter<T>> |
navigate(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.
|
access, accessLater, accessLater, accessSynchronously, add, addAfterNavigationListener, addBeforeEnterListener, addBeforeLeaveListener, addShortcutListener, addShortcutListener, beforeClientResponse, close, getActiveDragSourceComponent, getCsrfToken, getCurrent, getElement, getInternals, getLoadingIndicatorConfiguration, getLocale, getNavigationListeners, getPage, getPollInterval, getPushConfiguration, getReconnectDialogConfiguration, getSession, getUI, getUIId, init, isClosing, onAttach, onDetach, push, setCurrent, setLocale, setPollIntervaladdListener, fireEvent, from, get, getChildren, getEventBus, getId, getParent, getTranslation, getTranslation, hasListener, isTemplateMapped, isVisible, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPollListeneradd, addComponentAsFirst, addComponentAtIndex, remove, removeAllisEnabled, setEnabledremoveRouterLayoutContent, showRouterLayoutContentaddAttachListeneraddDetachListenerpublic static final String NO_NAVIGATION
public void doInit(VaadinRequest request, int uiId)
UIdoInit in class UIrequest - the initialization requestuiId - the id of the new uiUI.getUIId()@ClientCallable public void connectWebComponent(String tag, String webComponentElementId, elemental.json.JsonObject attributeJson)
Component that's added as a virtual child to the UI as the actual
relation of the elements is unknown.tag - web component tagwebComponentElementId - client side id of the elementattributeJson - initial attribute values as a JsonObject. If present, these
will override the default value designated by the
WebComponentExporter but only for this instance.public Router getRouter()
UIpublic Optional<ThemeDefinition> getThemeFor(Class<?> navigationTarget, String path)
UIThemeDefinition associated with the given navigation
target, if any. The theme is defined by using the Theme
annotation on the navigation target class.
If no Theme and NoTheme annotation are used, by default
the com.vaadin.flow.theme.lumo.Lumo class is used (if present on
the classpath).
getThemeFor in class UInavigationTarget - the navigation target classpath - the resolved route path so we can determine what the rendered
target is forThemeUtil.findThemeForNavigationTarget(UI, Class, String)public void navigate(String location)
UI
Besides the navigation to the location this method also updates
the browser location (and page history).
navigate in class UIlocation - the location to navigate to, not nullUI.navigate(String, QueryParameters),
Router.navigate(UI, Location, NavigationTrigger)public void navigate(Class<? extends Component> navigationTarget)
UI
Besides the navigation to the location this method also updates
the browser location (and page history).
public <T,C extends Component & HasUrlParameter<T>> void navigate(Class<? extends C> navigationTarget, T parameter)
UI
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.
public void navigate(String location, QueryParameters queryParameters)
UI
Besides the navigation to the location this method also updates
the browser location (and page history).
navigate in class UIlocation - the location to navigate to, not nullqueryParameters - query parameters that are used for navigation, not
nullUI.navigate(String),
Router.navigate(UI, Location, NavigationTrigger)Copyright © 2000–2019 Vaadin Ltd. All rights reserved.