Package io.jmix.ui
Class AppUI
java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractSingleComponentContainer
com.vaadin.ui.UI
io.jmix.ui.AppUI
- All Implemented Interfaces:
com.vaadin.event.Action.Container,com.vaadin.event.Action.Notifier,com.vaadin.event.ConnectorEventListener,com.vaadin.event.ContextClickEvent.ContextClickNotifier,com.vaadin.event.MethodEventSource,com.vaadin.event.SerializableEventListener,com.vaadin.event.UIEvents.PollNotifier,com.vaadin.server.ClientConnector,com.vaadin.server.ErrorHandler,com.vaadin.server.Sizeable,com.vaadin.server.VariableOwner,com.vaadin.shared.Connector,com.vaadin.ui.Component,com.vaadin.ui.Component.Focusable,com.vaadin.ui.Component.HasContextHelp,com.vaadin.ui.HasComponents,com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier,com.vaadin.ui.LegacyComponent,com.vaadin.ui.SingleComponentContainer,UiExceptionHandler.UiContext,EnhancedUI,Serializable,Iterable<com.vaadin.ui.Component>,EventListener
- Direct Known Subclasses:
TestAppUI
@SpringUI
public class AppUI
extends com.vaadin.ui.UI
implements com.vaadin.server.ErrorHandler, EnhancedUI, UiExceptionHandler.UiContext
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.vaadin.ui.UI
com.vaadin.ui.UI.WindowOrderUpdateEvent, com.vaadin.ui.UI.WindowOrderUpdateListenerNested classes/interfaces inherited from class com.vaadin.server.AbstractClientConnector
com.vaadin.server.AbstractClientConnector.IncorrectConcurrentAccessHandlerNested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListenerNested classes/interfaces inherited from interface com.vaadin.ui.Component
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.HasContextHelp, com.vaadin.ui.Component.ListenerNested classes/interfaces inherited from interface com.vaadin.ui.Component.HasContextHelp
com.vaadin.ui.Component.HasContextHelp.ContextHelpIconClickEvent, com.vaadin.ui.Component.HasContextHelp.ContextHelpIconClickListenerNested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListenerNested classes/interfaces inherited from interface com.vaadin.server.Sizeable
com.vaadin.server.Sizeable.Unit -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Appprotected org.springframework.beans.factory.BeanFactoryprotected CurrentAuthenticationprotected Dialogsprotected org.springframework.context.ApplicationEventPublisherprotected JmixFileDownloaderprotected Fragmentsprotected Historyprotected IconResolverstatic final Stringprotected Messagesprotected Notificationsprotected Screensprotected TestIdManagerprotected ThemeConstantsRepositoryprotected RootWindowprotected UiEventPublisherprotected UiEventsMulticasterprotected UiPropertiesprotected UrlChangeHandlerprotected UrlRoutingprotected UserSettingsToolsprotected WebBrowserToolsprotected WebJarResourceResolverFields inherited from class com.vaadin.ui.UI
actionManagerFields inherited from class com.vaadin.ui.AbstractComponent
componentErrorProvider, DESIGN_ATTR_PLAIN_TEXT, requiredErrorFields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidprotected Appcom.vaadin.server.ResourcecreateVersionedResource(String value) voiddetach()voiderror(com.vaadin.server.ErrorEvent event) getApp()static AppUIprotected com.vaadin.ui.AbstractComponentgetWebJarPath(String webjar, String partialPath) voidhandleRequest(com.vaadin.server.VaadinRequest request) booleanprotected voidinit(com.vaadin.server.VaadinRequest request) protected voidprotected voidDynamically init external JS libraries.booleanisAccessibleForUser(com.vaadin.ui.Component component) Check if users can interact with the component - there are no modal windows that prevent user action.booleanbooleanprotected booleanvoidpaintContent(com.vaadin.server.PaintTarget target) protected voidprocessExternalLink(com.vaadin.server.VaadinRequest request, NavigationState requestedState) protected voidprocessRequest(NavigationState navigationState) protected voidprotected voidrefresh(com.vaadin.server.VaadinRequest request) protected voidvoidremoveTimer(JmixTimer timer) protected voidrestoreRouteState(NavigationState requestedState) voidsetHistory(History history) voidsetTopLevelWindow(RootWindow window) INTERNAL.protected voidsetupUI()voidsetUrlChangeHandler(UrlChangeHandler urlChangeHandler) voidsetUrlRouting(UrlRouting urlRouting) protected voidshowCriticalExceptionMessage(Exception exception) translateToWebPath(String fullWebJarPath) protected voidupdateClientSystemMessages(Locale locale) voidprotected voidMethods inherited from class com.vaadin.ui.UI
access, accessSynchronously, addAction, addActionHandler, addClickListener, addPollListener, addWindow, addWindowOrderUpdateListener, attach, changeVariables, close, doInit, doRefresh, focus, getActionManager, getActiveDragSource, getComponentCount, getConnectorTracker, getEmbedId, getLastHeartbeatTimestamp, getLastProcessedClientToServerId, getLoadingIndicatorConfiguration, getLocaleService, getNavigator, getNotificationConfiguration, getOverlayContainerLabel, getPage, getPollInterval, getPushConfiguration, getPushConnection, getReconnectDialogConfiguration, getScrollLeft, getScrollTop, getSession, getState, getState, getStateType, getTabIndex, getTheme, getTooltipConfiguration, getUI, getUIId, getUiPathInfo, getUiRootPath, getWindows, isClosing, isConnectorEnabled, isMobileHtml5DndEnabled, isResizeLazy, isUsingThoroughSizeCheck, iterator, push, removeAction, removeActionHandler, removeClickListener, removePollListener, removeWindow, scrollIntoView, setActiveDragSource, setCaption, setContent, setCurrent, setFocusedComponent, setLastHeartbeatTimestamp, setLastProcessedClientToServerId, setMobileHtml5DndEnabled, setNavigator, setOverlayContainerLabel, setPollInterval, setPushConnection, setResizeLazy, setScrollLeft, setScrollTop, setSession, setTabIndex, setTheme, setUsingThoroughSizeCheck, showNotification, showNotification, showNotification, showNotification, showNotification, showNotificationMethods inherited from class com.vaadin.ui.AbstractSingleComponentContainer
addComponentAttachListener, addComponentDetachListener, fireComponentAttachEvent, fireComponentDetachEvent, getContent, readDesign, readDesignChildren, removeComponentAttachListener, removeComponentDetachListener, removeFromParent, setHeight, setWidth, writeDesignMethods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addContextHelpIconClickListener, addListener, addShortcutListener, addStyleName, beforeClientResponse, ensureContextHelpInitialized, findAncestor, fireComponentErrorEvent, fireComponentEvent, fireContextHelpClick, getCaption, getComponentError, getComponentErrorProvider, getContextHelpText, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getJTestId, getLocale, getParent, getPrimaryStyleName, getRequiredError, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaptionAsHtml, setComponentError, setComponentErrorProvider, setContextHelpText, setContextHelpTextHtmlEnabled, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setJTestId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredError, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthFull, setWidthUndefinedMethods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getIncorrectConcurrentAccessHandler, getListeners, getResource, getRpcManager, getRpcProxy, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setConnectorResource, setErrorHandler, setIncorrectConcurrentAccessHandler, setResource, updateDiffstateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, encodeState, getErrorHandler, getExtensions, getRpcManager, handleConnectorRequest, isAttached, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlerMethods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, addStyleNames, getCaption, getDescription, getIcon, getId, getJTestId, getLocale, getParent, getPrimaryStyleName, getStyleName, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setEnabled, setIcon, setId, setJTestId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible, writeDesignMethods inherited from interface com.vaadin.shared.Connector
getConnectorIdMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface com.vaadin.ui.LegacyComponent
markAsDirtyMethods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefinedMethods inherited from interface com.vaadin.server.VariableOwner
isEnabled
-
Field Details
-
app
-
LAST_REQUEST_PARAMS_ATTR
- See Also:
-
messages
-
eventPublisher
@Autowired protected org.springframework.context.ApplicationEventPublisher eventPublisher -
uiEventPublisher
-
uiProperties
-
themeConstantsRepository
-
currentAuthentication
-
uiEventsMulticaster
-
iconResolver
-
webJarResourceResolver
-
beanFactory
@Autowired protected org.springframework.beans.factory.BeanFactory beanFactory -
userSettingsTools
-
testIdManager
-
fileDownloader
-
topLevelWindow
-
fragments
-
screens
-
dialogs
-
notifications
-
webBrowserTools
-
urlChangeHandler
-
urlRouting
-
history
-
-
Constructor Details
-
AppUI
public AppUI()
-
-
Method Details
-
initJsLibraries
protected void initJsLibraries()Dynamically init external JS libraries. You should create JavaScriptExtension class and extend UI object here.
Example:
JavaScriptExtension: @JavaScript("resources/jquery/jquery-1.10.2.min.js") public class JQueryIntegration extends AbstractJavaScriptExtension { @Override public void extend(AbstractClientConnector target) { super.extend(target); } @Override protected Class<? extends ClientConnector> getSupportedParentType() { return UI.class; } } AppUI: protected void initJsLibraries() { new JQueryIntegration().extend(this); }If you want to include scripts to generated page statically implement
BootstrapListener -
initInternalComponents
protected void initInternalComponents() -
createApplication
-
getScreens
- Specified by:
getScreensin interfaceUiExceptionHandler.UiContext- Returns:
- screens screens API
-
getDialogs
- Specified by:
getDialogsin interfaceUiExceptionHandler.UiContext- Returns:
- dialogs API
-
getNotifications
- Specified by:
getNotificationsin interfaceUiExceptionHandler.UiContext- Returns:
- notifications API
-
getWebBrowserTools
- Specified by:
getWebBrowserToolsin interfaceUiExceptionHandler.UiContext- Returns:
- web browser API
-
getFragments
- Specified by:
getFragmentsin interfaceUiExceptionHandler.UiContext- Returns:
- fragments API
-
getUrlRouting
-
getUrlChangeHandler
-
getHistory
-
init
protected void init(com.vaadin.server.VaadinRequest request) - Specified by:
initin classcom.vaadin.ui.UI
-
hasAuthenticatedSession
public boolean hasAuthenticatedSession()- Returns:
trueif authentication is set and it isn't represented byAnonymousAuthenticationToken
-
publishAppInitializedEvent
-
showCriticalExceptionMessage
-
setupUI
protected void setupUI() -
refresh
protected void refresh(com.vaadin.server.VaadinRequest request) - Overrides:
refreshin classcom.vaadin.ui.UI
-
handleRequest
public void handleRequest(com.vaadin.server.VaadinRequest request) - Overrides:
handleRequestin classcom.vaadin.ui.UI
-
getCurrent
- Returns:
- current AppUI
-
getApp
- Returns:
- this App instance
-
getTopLevelWindow
- Returns:
- currently displayed top-level window
-
getTopLevelWindowNN
-
setTopLevelWindow
INTERNAL. Set currently displayed top-level window. -
getTestIdManager
-
removePreviousTopLevelWindowConnector
protected void removePreviousTopLevelWindowConnector() -
isTestMode
public boolean isTestMode()- Returns:
- true if UI test mode is enabled and j-test-id attribute should be added to DOM tree
-
isPerformanceTestMode
public boolean isPerformanceTestMode() -
error
public void error(com.vaadin.server.ErrorEvent event) - Specified by:
errorin interfacecom.vaadin.server.ErrorHandler
-
detach
public void detach()- Specified by:
detachin interfacecom.vaadin.server.ClientConnector- Overrides:
detachin classcom.vaadin.ui.UI
-
updateClientSystemMessages
-
getTopLevelWindowComposition
protected com.vaadin.ui.AbstractComponent getTopLevelWindowComposition() -
getTimers
-
addTimer
-
removeTimer
-
beforeTopLevelWindowInit
public void beforeTopLevelWindowInit() -
updateUiTheme
protected void updateUiTheme() -
getFileDownloader
-
getUiEventsMulticaster
-
createVersionedResource
- Specified by:
createVersionedResourcein interfaceEnhancedUI
-
getWebJarPath
- Specified by:
getWebJarPathin interfaceEnhancedUI
-
translateToWebPath
- Specified by:
translateToWebPathin interfaceEnhancedUI
-
paintContent
public void paintContent(com.vaadin.server.PaintTarget target) throws com.vaadin.server.PaintException - Specified by:
paintContentin interfacecom.vaadin.ui.LegacyComponent- Overrides:
paintContentin classcom.vaadin.ui.UI- Throws:
com.vaadin.server.PaintException
-
isVaadinSessionOpen
protected boolean isVaadinSessionOpen() -
isAccessibleForUser
public boolean isAccessibleForUser(com.vaadin.ui.Component component) Check if users can interact with the component - there are no modal windows that prevent user action.- Parameters:
component- component- Returns:
- whether it accessible or not
-
updateSystemMessagesLocale
-