public abstract class LspsUIBase
extends com.vaadin.ui.UI
afterRequestHandling()
method is called. The navigation itself must happen only after the database
transaction is committed - this is so that new https request generated by the navigation can open new transaction
and see all data modifications performed by this one. (LSPS-8988 and subsequent LSPS-9005)com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
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
com.vaadin.server.Sizeable.Unit
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
Constructor and Description |
---|
LspsUIBase() |
Modifier and Type | Method and Description |
---|---|
void |
afterRequestHandling()
Perform all the logic needed to happen after request was handled and before response json was created.
|
protected void |
closeTransactionAndNavigate()
Commit (close) database transaction and then navigate away.
|
abstract void |
error(Throwable error)
Handle error.
|
LspsAppConnector |
getAppConnector()
Returns the LSPS connector object.
|
protected void |
handleErrors() |
protected void |
handleNotifications() |
void |
navigateTo(String viewId)
Opens a view for the given viewId.
|
void |
postponeErrorHandling(Throwable throwable)
Error handling in case we want to notify the user or log the error, but we can't throw it
right away.
|
void |
postponeNotification(com.vaadin.ui.Notification notification)
Postpone the notification till the end of request.
|
protected void |
setAppConnector(LspsAppConnector appConnector) |
access, accessSynchronously, addAction, addActionHandler, addClickListener, addListener, addPollListener, addWindow, attach, changeVariables, close, detach, doInit, doRefresh, focus, getActionManager, getComponentCount, getConnectorTracker, getCurrent, getEmbedId, getLastHeartbeatTimestamp, getLastProcessedClientToServerId, getLoadingIndicatorConfiguration, getLocaleService, getNavigator, getNotificationConfiguration, getOverlayContainerLabel, getPage, getPollInterval, getPushConfiguration, getPushConnection, getReconnectDialogConfiguration, getScrollLeft, getScrollTop, getSession, getState, getState, getStateType, getTabIndex, getTheme, getTooltipConfiguration, getUI, getUIId, getWindows, init, isClosing, isConnectorEnabled, isResizeLazy, iterator, paintContent, push, refresh, removeAction, removeActionHandler, removeClickListener, removeListener, removePollListener, removeWindow, scrollIntoView, setCaption, setContent, setCurrent, setFocusedComponent, setLastHeartbeatTimestamp, setLastProcessedClientToServerId, setNavigator, setOverlayContainerLabel, setPollInterval, setPushConnection, setResizeLazy, setScrollLeft, setScrollTop, setSession, setTabIndex, setTheme, showNotification, showNotification, showNotification, showNotification, showNotification, showNotification
addComponentAttachListener, addComponentDetachListener, fireComponentAttachEvent, fireComponentDetachEvent, getContent, readDesign, readDesignChildren, removeComponentAttachListener, removeComponentDetachListener, removeFromParent, setHeight, setWidth, writeDesign
addContextClickListener, addListener, addShortcutListener, addStyleName, beforeClientResponse, findAncestor, fireComponentErrorEvent, fireComponentEvent, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getExplicitImmediateValue, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isEnabled, isImmediate, isOrHasAncestor, isReadOnly, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidthUndefined
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, isEnabled, isReadOnly, isVisible, readDesign, removeListener, removeStyleName, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible, writeDesign
addAttachListener, addDetachListener, beforeClientResponse, encodeState, getErrorHandler, getExtensions, getRpcManager, handleConnectorRequest, isAttached, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined
forEach, spliterator
protected void setAppConnector(LspsAppConnector appConnector)
public LspsAppConnector getAppConnector()
public abstract void error(Throwable error)
error
- to be handled.public void navigateTo(String viewId)
Navigator.navigateTo(String)
.
The navigation is postponed till afterRequestHandling()
is called. This method only stores the target view id in a field.viewId
- public void postponeErrorHandling(Throwable throwable)
throwable
- public void postponeNotification(com.vaadin.ui.Notification notification)
notification
- protected void closeTransactionAndNavigate()
VaadinService.requestEnd(com.vaadin.server.VaadinRequest, com.vaadin.server.VaadinResponse, com.vaadin.server.VaadinSession)
, because json was created and sent already
* navigation can not be happen in VaadinServletWithTransaction
, because the same as above apply and ui object does not exist
anymore at that point.protected void handleErrors()
protected void handleNotifications()
public void afterRequestHandling()
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.