Uses of Annotation Interface
com.vaadin.flow.js.JsExpression
Packages that use JsExpression
Package
Description
Server-side access to the browser's Screen Orientation API for observing and
locking the device's screen orientation.
Trigger API and its internal wiring.
Server-side access to the browser's Screen Wake Lock API, which keeps the
device screen from dimming or locking — useful for dashboards, kiosks,
presentations, and recipe or workout screens.
-
Uses of JsExpression in com.vaadin.flow.component
Methods in com.vaadin.flow.component with annotations of type JsExpressionModifier and TypeMethodDescriptionvoidFocusable.FocusJs.blur()Removes focus from the element.voidFocusable.FocusJs.focus(@Nullable tools.jackson.databind.node.ObjectNode options) Focuses the element.ClickNotifier.ClickFiltersJs.isClickCountBetween(int min, int max) Accepts a click whose click count, thedetailof the event, is within the given range.ShortcutRegistration.ShortcutFilterJs.matchKeydown(String requiredModifiers, String forbiddenModifiers, boolean checkOwnerScope, String ownerSelector, boolean preventDefault, boolean stopPropagation, boolean resetFocus, String... keys) Creates the filter forDomListenerRegistration.setFilterExpression(DomEventFilter)that passes a keydown that matches the given key and modifiers.voidUI.UiJs.navigateToClient(String clientRoute) Hands a route to the client side router, which navigates to it without asking the server first.voidShortcutRegistration.ShortcutJs.registerKeydownDelegate(JsFunction locateDelegate, String requiredModifiers, String forbiddenModifiers, boolean checkBoundary, boolean resetFocus, boolean allowDefault, String... keys) Relays the keydown events of an element that only exists in the browser to the element this definition was obtained from, the listen-on component of a shortcut.voidUI.UiJs.setDirection(String direction) Sets the direction the document is read in. -
Uses of JsExpression in com.vaadin.flow.component.internal
Methods in com.vaadin.flow.component.internal with annotations of type JsExpressionModifier and TypeMethodDescriptionWebPushJs.getSubscription()Reads the push subscription of the service worker.Declares the function that loads a chunk, forPage.addDynamicImport(JsFunction).WebPushJs.notificationDenied()Checks whether notifications are denied.WebPushJs.notificationGranted()Checks whether notifications are granted.WebPushJs.registrationStatus()Checks whether the service worker has a push subscription.Sets the title of the page.UIInternals.TitleJs.setTitleAfterNavigation(String title) Sets the title of the page once the client side router has finished navigating, so that the title of the page it navigated away from is not the one that sticks.Asks for the notification permission and subscribes to web push.WebPushJs.unsubscribe()Removes the push subscription of the service worker. -
Uses of JsExpression in com.vaadin.flow.component.page
Methods in com.vaadin.flow.component.page with annotations of type JsExpressionModifier and TypeMethodDescriptionvoidHistory.HistoryJs.back()Goes back one entry, as the back button of the browser does.voidRemoves every value of a storage.voidHistory.HistoryJs.forward()Goes forward one entry, as the forward button of the browser does.Page.PageJs.getHref()The address the browser is at.Reads the value of a key.voidHistory.HistoryJs.go(int steps) Goes the given number of entries forward, or backward for a negative number.voidHistory.HistoryJs.navigatePushing(tools.jackson.databind.node.BaseJsonNode state, String url, boolean callback) Hands the address to the client side router, which pushes the history entry itself once it has navigated.voidHistory.HistoryJs.navigateReplacing(tools.jackson.databind.node.BaseJsonNode state, String url, boolean callback) Hands the address to the client side router, which replaces the current history entry once it has navigated.voidOpens a URL in the window with the given name, after telling the client that a redirect is pending.voidPushes a history entry, for an application whose client side router does not write one itself.ExtendedClientDetails.ClientDetailsJs.readDetails()Reads what the browser reports about itself, which is the same set of values the bootstrap collects.Page.PageJs.readDirection()Reads the direction the document is read in.voidPage.PageJs.reload()Loads the page again.voidWebStorage.WebStorageJs.removeItem(String storage, String key) Removes the value of a key.voidHistory.HistoryJs.replaceState(tools.jackson.databind.node.BaseJsonNode state, String url) Replaces the current history entry, for an application whose client side router does not write one itself.voidPage.PageJs.resetColorScheme()Lets the document follow the color scheme the user asked the browser for.voidPage.PageJs.setColorScheme(String theme, String colorScheme) Pins the document to a color scheme.voidWrites a value. -
Uses of JsExpression in com.vaadin.flow.component.screenorientation
Methods in com.vaadin.flow.component.screenorientation with annotations of type JsExpressionModifier and TypeMethodDescriptionLocks the screen to the given orientation.ScreenOrientation.ScreenOrientationJs.unlock()Lets the screen follow the device again. -
Uses of JsExpression in com.vaadin.flow.component.trigger.internal
Methods in com.vaadin.flow.component.trigger.internal with annotations of type JsExpressionModifier and TypeMethodDescriptionvoidSignalInput.MirrorJs.setProperty(String propertyName, Object value) Writes the value of the signal to the property the trigger reads. -
Uses of JsExpression in com.vaadin.flow.component.wakelock
Methods in com.vaadin.flow.component.wakelock with annotations of type JsExpression -
Uses of JsExpression in com.vaadin.flow.component.webcomponent
Methods in com.vaadin.flow.component.webcomponent with annotations of type JsExpressionModifier and TypeMethodDescriptionvoidWebComponent.CustomEventJs.fireEvent(String eventName, tools.jackson.databind.node.ObjectNode options) Fires an event on the host of the web component.voidWebComponentUI.ThemeAttributesJs.setAttributes(String tag, tools.jackson.databind.node.ObjectNode attributes) Sets the given attributes on every element of the given tag. -
Uses of JsExpression in com.vaadin.flow.dom
Methods in com.vaadin.flow.dom with annotations of type JsExpressionModifier and TypeMethodDescriptionElement.CallFunctionJs.callFunction(String functionName, Object... arguments) Calls the named function on the element, with the element asthisof a plain name and the property it is read from asthisof a dotted one, which is how a function reached through a property is called in JavaScript.voidElement.ElementJs.flashClass(String className) Adds the CSS class to the element and removes it again when the animation it starts has ended.voidElement.ElementJs.forwardWindowResize()Dispatches awindow-resizeevent on the element whenever the browser window is resized, with the new browser window width and height (the viewport size, excluding scrollbars) as itswandhproperties, so that a resize can be listened to on the element.voidElement.ScrollIntoViewJs.scrollIntoView()Scrolls the element into view the way the browser does by default, deferred so that it also works on an element that was created in the same response.voidElement.ScrollIntoViewJs.scrollIntoView(tools.jackson.databind.node.ObjectNode options) Scrolls the element into view with the given options, deferred so that it also works on an element that was created in the same response. -
Uses of JsExpression in com.vaadin.flow.dom.impl
Methods in com.vaadin.flow.dom.impl with annotations of type JsExpressionModifier and TypeMethodDescriptionvoidAbstractNodeStateProvider.AttachExistingElementJs.attachExistingElement(Node<?> parent, Element previousSibling, String tagName, int id) Looks for an element with the given tag name among the children of the parent, after the previous sibling, and reports the outcome to the server for the node with the given id. -
Uses of JsExpression in com.vaadin.flow.router
Methods in com.vaadin.flow.router with annotations of type JsExpressionModifier and TypeMethodDescriptionvoidAbstractRouteNotFoundError.CopilotJs.reportNoRoutes()Tells Copilot that the project has no routes yet, waiting for it to load rather than assuming it already has. -
Uses of JsExpression in com.vaadin.flow.server.communication
Methods in com.vaadin.flow.server.communication with annotations of type JsExpressionModifier and TypeMethodDescriptionvoidWebComponentBootstrapHandler.StylesheetJs.addStylesheet(String href) Adds a stylesheet link to the head of the document.voidPushes the given hash onto the location the browser is at, for a v7 UIDL that named no location to go with it.voidUidlRequestHandler.MprPushStateJs.pushLocation(String location) Pushes the given location, which the v7 UIDL gave in full. -
Uses of JsExpression in com.vaadin.flow.server.communication.rpc
Methods in com.vaadin.flow.server.communication.rpc with annotations of type JsExpressionModifier and TypeMethodDescriptionvoidPublishedServerEventHandlerRpcHandler.PromiseJs.reject(int promiseId) Settles the promise with the failure of the method, which threw rather than returned.voidSettles the promise with what the method returned.