com.vaadin.flow.component.internal.
Class JavaScriptBootstrapUI
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.UI
-
- com.vaadin.flow.component.internal.JavaScriptBootstrapUI
-
All Implemented Interfaces:
AttachNotifier
,DetachNotifier
,HasComponents
,HasElement
,HasEnabled
,PollNotifier
,RouterLayout
,Serializable
public class JavaScriptBootstrapUI extends UI
Custom UI for
JavaScriptBootstrapHandler
. This class is intended for internal use in client side bootstrapping.For internal use only. May be renamed or removed in a future release.
See Also:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JavaScriptBootstrapUI.ClientViewPlaceholder
Placeholder view when navigating from server-side views to client-side views.
-
Field Summary
Fields Modifier and Type Field Description static String
SERVER_ROUTING
-
Constructor Summary
Constructors Constructor Description JavaScriptBootstrapUI()
Create UI for client side bootstrapping.
-
Method Summary
All Methods Modifier and Type Method Description void
connectClient(String clientElementTag, String clientElementId, String flowRoute, String appShellTitle, elemental.json.JsonValue historyState)
Connect a client with the server side UI.
Stream<Component>
getChildren()
Gets the child components of this component.
String
getForwardToClientUrl()
Gets the new forward url.
void
leaveNavigation(String route)
Check that the view can be leave.
void
navigate(String pathname, 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, doInit, getActiveDragSourceComponent, getCsrfToken, getCurrent, getElement, getInternals, getLoadingIndicatorConfiguration, getLocale, getNavigationListeners, getPage, getPollInterval, getPushConfiguration, getReconnectDialogConfiguration, getRouter, getSession, getUI, getUIId, hasModalComponent, init, isClosing, isNavigationSupported, navigate, navigate, navigate, navigate, onAttach, onDetach, push, setChildComponentModal, setCurrent, setDirection, setLocale, setPollInterval
-
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, 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
-
SERVER_ROUTING
public static final String SERVER_ROUTING
See Also:
-
-
Method Detail
-
getChildren
public Stream<Component> getChildren()
Description copied from class:
Component
Gets the child components of this component.
The default implementation finds child components by traversing each child
Element
tree.If the component is injected to a PolymerTemplate using the
@Id
annotation the getChildren method will only return children added from the server side and will not return any children declared in the template file.Overrides:
getChildren
in classComponent
Returns:
the child components of this component
See Also:
-
getForwardToClientUrl
public String getForwardToClientUrl()
Gets the new forward url.
Returns:
the new forward url
-
connectClient
@ClientCallable public void connectClient(String clientElementTag, String clientElementId, String flowRoute, String appShellTitle, elemental.json.JsonValue historyState)
Connect a client with the server side UI. This method is invoked each time client router navigates to a server route.
Parameters:
clientElementTag
- client side element tagclientElementId
- client side element idflowRoute
- flow route that should be attached to the client elementappShellTitle
- client side title of the application shellhistoryState
- client side history state value
-
leaveNavigation
@ClientCallable public void leaveNavigation(String route)
Check that the view can be leave. This method is invoked when the client router tries to navigate to a client route while the current route is a server route. This is only called when client route navigates from a server to a client view.
Parameters:
route
- the route that is navigating to.
-
navigate
public void navigate(String pathname, 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:
pathname
- 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)
-
-