Package io.jmix.flowui.view
Class ViewControllerUtils
java.lang.Object
io.jmix.flowui.view.ViewControllerUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.vaadin.flow.shared.RegistrationaddAfterCloseListener(View<?> view, com.vaadin.flow.component.ComponentEventListener<View.AfterCloseEvent> listener) static com.vaadin.flow.shared.RegistrationaddBeforeShowEvent(View<?> view, com.vaadin.flow.component.ComponentEventListener<View.BeforeShowEvent> listener) Deprecated, for removal: This API element is subject to removal in a future version.static com.vaadin.flow.shared.RegistrationaddBeforeShowEventListener(View<?> view, com.vaadin.flow.component.ComponentEventListener<View.BeforeShowEvent> listener) static com.vaadin.flow.shared.RegistrationaddDetachListener(View<?> view, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.DetachEvent> listener) static <T> com.vaadin.flow.shared.RegistrationaddInitEntityEvent(StandardDetailView<T> view, com.vaadin.flow.component.ComponentEventListener<StandardDetailView.InitEntityEvent<T>> listener) Deprecated, for removal: This API element is subject to removal in a future version.static <T> com.vaadin.flow.shared.RegistrationaddInitEntityEventListener(StandardDetailView<T> view, com.vaadin.flow.component.ComponentEventListener<StandardDetailView.InitEntityEvent<T>> listener) static com.vaadin.flow.shared.RegistrationaddPostReadyListener(View<?> view, com.vaadin.flow.component.ComponentEventListener<View.PostReadyEvent> listener) static com.vaadin.flow.shared.RegistrationaddQueryParametersChangeListener(View<?> view, com.vaadin.flow.component.ComponentEventListener<View.QueryParametersChangeEvent> listener) static com.vaadin.flow.shared.RegistrationaddReadyListener(View<?> view, com.vaadin.flow.component.ComponentEventListener<View.ReadyEvent> listener) static com.vaadin.flow.shared.RegistrationaddRestoreComponentsStateEventListener(View<?> view, com.vaadin.flow.component.ComponentEventListener<View.RestoreComponentsStateEvent> listener) AddsView.RestoreComponentsStateEventlistener.static com.vaadin.flow.shared.RegistrationaddValidationEventListener(StandardDetailView<?> view, com.vaadin.flow.component.ComponentEventListener<StandardDetailView.ValidationEvent> listener) static voidconfigureDialogWindowFooter(View<?> view, DialogWindowFooter dialogWindowFooter) static voidconfigureDialogWindowHeader(View<?> view, DialogWindowHeader dialogWindowHeader) static <A extends Annotation>
Optional<A>findAnnotation(com.vaadin.flow.component.Component component, Class<A> annotationClass) static <A extends Annotation>
Optional<A>findAnnotation(Class<? extends com.vaadin.flow.component.Component> componentClass, Class<A> annotationClass) static voidstatic List<org.springframework.context.ApplicationListener<?>>getApplicationEventListeners(View<?> view) Returns a list of application event listeners associated with a givenView.static StringgetPackage(Class<?> controllerClass) static StringgetPageTitle(com.vaadin.flow.component.Component component) static StringgetRouteParamName(StandardDetailView<?> detailView) static ViewActionsgetViewActions(View<?> view) static ViewDatagetViewData(View<?> view) static <T extends Facet>
TgetViewFacet(View<?> view, Class<T> facetClass) static ViewFacetsgetViewFacets(View<?> view) static booleanisSameView(View<?> view, View<?> other) static booleanisSaveActionPerformed(StandardDetailView<?> detailView) static voidprocessBeforeEnterInternal(View<?> view, com.vaadin.flow.router.BeforeEnterEvent event) static voidsetAfterNavigationHandler(View<?> view, Runnable operation) static voidsetApplicationEventListeners(View<?> view, List<org.springframework.context.ApplicationListener<?>> listeners) Sets the application event listeners for the specifiedView.static voidsetPageTitleDelegate(View<?> view, Consumer<String> pageTitleDelegate) static voidsetViewActions(View<?> view, ViewActions viewActions) static <T extends com.vaadin.flow.component.Component>
voidsetViewCloseDelegate(View<T> view, Consumer<View<T>> closeDelegate) static voidsetViewData(View<?> view, ViewData viewData) static voidsetViewFacets(View<?> view, ViewFacets viewFacets)
-
Method Details
-
getPageTitle
-
findAnnotation
public static <A extends Annotation> Optional<A> findAnnotation(com.vaadin.flow.component.Component component, Class<A> annotationClass) -
findAnnotation
public static <A extends Annotation> Optional<A> findAnnotation(Class<? extends com.vaadin.flow.component.Component> componentClass, Class<A> annotationClass) -
getPackage
-
getViewData
-
setViewData
-
getViewActions
-
setViewActions
-
getViewFacets
-
getViewFacet
-
setViewFacets
-
fireEvent
-
isSaveActionPerformed
-
addQueryParametersChangeListener
public static com.vaadin.flow.shared.Registration addQueryParametersChangeListener(View<?> view, com.vaadin.flow.component.ComponentEventListener<View.QueryParametersChangeEvent> listener) -
addRestoreComponentsStateEventListener
public static com.vaadin.flow.shared.Registration addRestoreComponentsStateEventListener(View<?> view, com.vaadin.flow.component.ComponentEventListener<View.RestoreComponentsStateEvent> listener) AddsView.RestoreComponentsStateEventlistener.- Parameters:
listener- the listened to add, notnull- Returns:
- a registration object that can be used for removing the listener
-
addInitEntityEventListener
public static <T> com.vaadin.flow.shared.Registration addInitEntityEventListener(StandardDetailView<T> view, com.vaadin.flow.component.ComponentEventListener<StandardDetailView.InitEntityEvent<T>> listener) -
addBeforeShowEventListener
public static com.vaadin.flow.shared.Registration addBeforeShowEventListener(View<?> view, com.vaadin.flow.component.ComponentEventListener<View.BeforeShowEvent> listener) -
addDetachListener
public static com.vaadin.flow.shared.Registration addDetachListener(View<?> view, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.DetachEvent> listener) -
addAfterCloseListener
public static com.vaadin.flow.shared.Registration addAfterCloseListener(View<?> view, com.vaadin.flow.component.ComponentEventListener<View.AfterCloseEvent> listener) -
addValidationEventListener
public static com.vaadin.flow.shared.Registration addValidationEventListener(StandardDetailView<?> view, com.vaadin.flow.component.ComponentEventListener<StandardDetailView.ValidationEvent> listener) -
addReadyListener
public static com.vaadin.flow.shared.Registration addReadyListener(View<?> view, com.vaadin.flow.component.ComponentEventListener<View.ReadyEvent> listener) -
addPostReadyListener
public static com.vaadin.flow.shared.Registration addPostReadyListener(View<?> view, com.vaadin.flow.component.ComponentEventListener<View.PostReadyEvent> listener) -
addInitEntityEvent
@Deprecated(since="2.2", forRemoval=true) public static <T> com.vaadin.flow.shared.Registration addInitEntityEvent(StandardDetailView<T> view, com.vaadin.flow.component.ComponentEventListener<StandardDetailView.InitEntityEvent<T>> listener) Deprecated, for removal: This API element is subject to removal in a future version. -
addBeforeShowEvent
@Deprecated(since="2.2", forRemoval=true) public static com.vaadin.flow.shared.Registration addBeforeShowEvent(View<?> view, com.vaadin.flow.component.ComponentEventListener<View.BeforeShowEvent> listener) Deprecated, for removal: This API element is subject to removal in a future version. -
setViewCloseDelegate
-
setPageTitleDelegate
-
isSameView
-
getRouteParamName
-
getApplicationEventListeners
public static List<org.springframework.context.ApplicationListener<?>> getApplicationEventListeners(View<?> view) Returns a list of application event listeners associated with a givenView. -
setApplicationEventListeners
public static void setApplicationEventListeners(View<?> view, @Nullable List<org.springframework.context.ApplicationListener<?>> listeners) Sets the application event listeners for the specifiedView. -
processBeforeEnterInternal
public static void processBeforeEnterInternal(View<?> view, com.vaadin.flow.router.BeforeEnterEvent event) -
configureDialogWindowHeader
-
addBeforeShowEventListener(View, ComponentEventListener)instead