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.See Also:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
JavaScriptBootstrapUI.ClientViewPlaceholder
Placeholder view when navigating from server-side views to client-side views.
-
Field Summary
Fields Modifier and Type Field and Description static String
SERVER_ROUTING
-
Constructor Summary
Constructors Constructor and Description JavaScriptBootstrapUI()
Create UI for client side bootstrapping.
-
Method Summary
All Methods Modifier and Type Method and Description void
connectClient(String clientElementTag, String clientElementId, String flowRoute)
Connect a client with the server side UI.
Stream<Component>
getChildren()
Gets the child components of this component.
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, addShortcutListener, addShortcutListener, beforeClientResponse, close, doInit, getActiveDragSourceComponent, getCsrfToken, getCurrent, getElement, getInternals, getLoadingIndicatorConfiguration, getLocale, getNavigationListeners, getPage, getPollInterval, getPushConfiguration, getReconnectDialogConfiguration, getRouter, getSession, getUI, getUIId, init, isClosing, navigate, navigate, navigate, onAttach, onDetach, push, setCurrent, setLocale, setPollInterval
-
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, getEventBus, getId, getParent, getTranslation, getTranslation, hasListener, 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.PollNotifier
addPollListener
-
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.router.RouterLayout
removeRouterLayoutContent, showRouterLayoutContent
-
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
-
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
-
-
-
-
Field Detail
-
SERVER_ROUTING
public static final String SERVER_ROUTING
See Also:
-
-
Constructor Detail
-
JavaScriptBootstrapUI
public JavaScriptBootstrapUI()
Create UI for client side bootstrapping.
-
-
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:
-
connectClient
@ClientCallable public void connectClient(String clientElementTag, String clientElementId, String flowRoute)
Connect a client with the server side UI.
Parameters:
clientElementTag
- client side element tagclientElementId
- client side element idflowRoute
- flow route that should be attached to the client element
-
leaveNavigation
@ClientCallable public void leaveNavigation(String route)
Check that the view can be leave. 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)
-
-