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 classes/interfaces inherited from class com.vaadin.ui.UI
com.vaadin.ui.UI.WindowOrderUpdateEvent, com.vaadin.ui.UI.WindowOrderUpdateListener
Nested classes/interfaces inherited from class com.vaadin.server.AbstractClientConnector
com.vaadin.server.AbstractClientConnector.IncorrectConcurrentAccessHandler
Nested 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.DetachListener
Nested 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.Listener
Nested classes/interfaces inherited from interface com.vaadin.ui.Component.HasContextHelp
com.vaadin.ui.Component.HasContextHelp.ContextHelpIconClickEvent, com.vaadin.ui.Component.HasContextHelp.ContextHelpIconClickListener
Nested 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.ComponentDetachListener
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
com.vaadin.server.Sizeable.Unit
-
Field Summary
Modifier and TypeFieldDescriptionprotected App
protected org.springframework.beans.factory.BeanFactory
protected CurrentAuthentication
protected Dialogs
protected org.springframework.context.ApplicationEventPublisher
protected JmixFileDownloader
protected Fragments
protected History
protected IconResolver
static final String
static final String
protected Messages
protected Notifications
protected Screens
protected TestIdManager
protected ThemeConstantsRepository
protected RootWindow
protected UiEventPublisher
protected UiEventsMulticaster
protected UiProperties
protected UrlChangeHandler
protected UrlRouting
protected UserSettingsTools
protected WebBrowserTools
protected WebJarResourceResolver
Fields inherited from class com.vaadin.ui.UI
actionManager
Fields inherited from class com.vaadin.ui.AbstractComponent
componentErrorProvider, DESIGN_ATTR_PLAIN_TEXT, requiredError
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
protected App
com.vaadin.server.Resource
createVersionedResource
(String value) void
detach()
void
error
(com.vaadin.server.ErrorEvent event) getApp()
static AppUI
protected com.vaadin.ui.AbstractComponent
getWebJarPath
(String webjar, String partialPath) void
handleRequest
(com.vaadin.server.VaadinRequest request) boolean
protected void
init
(com.vaadin.server.VaadinRequest request) protected void
protected void
Dynamically init external JS libraries.boolean
isAccessibleForUser
(com.vaadin.ui.Component component) Check if users can interact with the component - there are no modal windows that prevent user action.protected boolean
isLinkHandlerRequest
(com.vaadin.server.VaadinRequest request) boolean
boolean
protected boolean
void
paintContent
(com.vaadin.server.PaintTarget target) protected void
processExternalLink
(com.vaadin.server.VaadinRequest request, NavigationState requestedState) protected void
processLinkHandlerRequest
(com.vaadin.server.VaadinRequest request) protected void
processRequest
(NavigationState navigationState) protected void
protected void
refresh
(com.vaadin.server.VaadinRequest request) void
removeTimer
(JmixTimer timer) protected void
restoreRouteState
(NavigationState requestedState) void
setHistory
(History history) void
setTopLevelWindow
(RootWindow window) INTERNAL.protected void
setupUI()
void
setUrlChangeHandler
(UrlChangeHandler urlChangeHandler) void
setUrlRouting
(UrlRouting urlRouting) protected void
showCriticalExceptionMessage
(Exception exception) translateToWebPath
(String fullWebJarPath) protected void
updateClientSystemMessages
(Locale locale) void
protected void
Methods 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, showNotification
Methods inherited from class com.vaadin.ui.AbstractSingleComponentContainer
addComponentAttachListener, addComponentDetachListener, fireComponentAttachEvent, fireComponentDetachEvent, getContent, readDesign, readDesignChildren, removeComponentAttachListener, removeComponentDetachListener, removeFromParent, setHeight, setWidth, writeDesign
Methods 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, setWidthUndefined
Methods 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, updateDiffstate
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, encodeState, getErrorHandler, getExtensions, getRpcManager, handleConnectorRequest, isAttached, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
Methods 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, writeDesign
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.vaadin.ui.LegacyComponent
markAsDirty
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
Methods inherited from interface com.vaadin.server.VariableOwner
isEnabled
-
Field Details
-
app
-
LAST_REQUEST_ACTION_ATTR
- See Also:
-
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:
getScreens
in interfaceUiExceptionHandler.UiContext
- Returns:
- screens manager
-
getDialogs
- Specified by:
getDialogs
in interfaceUiExceptionHandler.UiContext
- Returns:
- dialogs API
-
getNotifications
- Specified by:
getNotifications
in interfaceUiExceptionHandler.UiContext
- Returns:
- notifications API
-
getWebBrowserTools
- Specified by:
getWebBrowserTools
in interfaceUiExceptionHandler.UiContext
- Returns:
- web browser API
-
getFragments
- Specified by:
getFragments
in interfaceUiExceptionHandler.UiContext
- Returns:
- fragments API
-
getUrlRouting
-
getUrlChangeHandler
-
getHistory
-
init
protected void init(com.vaadin.server.VaadinRequest request) - Specified by:
init
in classcom.vaadin.ui.UI
-
hasAuthenticatedSession
public boolean hasAuthenticatedSession()- Returns:
true
if 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:
refresh
in classcom.vaadin.ui.UI
-
handleRequest
public void handleRequest(com.vaadin.server.VaadinRequest request) - Overrides:
handleRequest
in 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
-
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:
error
in interfacecom.vaadin.server.ErrorHandler
-
isLinkHandlerRequest
protected boolean isLinkHandlerRequest(com.vaadin.server.VaadinRequest request) -
processLinkHandlerRequest
protected void processLinkHandlerRequest(com.vaadin.server.VaadinRequest request) -
detach
public void detach()- Specified by:
detach
in interfacecom.vaadin.server.ClientConnector
- Overrides:
detach
in 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:
createVersionedResource
in interfaceEnhancedUI
-
getWebJarPath
- Specified by:
getWebJarPath
in interfaceEnhancedUI
-
translateToWebPath
- Specified by:
translateToWebPath
in interfaceEnhancedUI
-
paintContent
public void paintContent(com.vaadin.server.PaintTarget target) throws com.vaadin.server.PaintException - Specified by:
paintContent
in interfacecom.vaadin.ui.LegacyComponent
- Overrides:
paintContent
in 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
-