public class CmsWindowExtension extends com.vaadin.server.AbstractExtension
While Page.open() can also be used to open new windows, it doesn't give you any feedback on whether opening the window was successful. Using this extension, it is possible to pass a callback which gets called with a parameter indicating whether opening the window succeeded or not.
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| Constructor and Description |
|---|
CmsWindowExtension(com.vaadin.ui.UI ui)
Creates a new instance and binds it to the given UI.
|
| Modifier and Type | Method and Description |
|---|---|
void |
open(java.lang.String location,
java.lang.String target,
java.lang.Runnable onFailure)
Tries to open a new browser window.
|
extend, getParent, getSupportedParentType, remove, setParentaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, attach, beforeClientResponse, createState, detach, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getState, getState, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isConnectorEnabled, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlerpublic CmsWindowExtension(com.vaadin.ui.UI ui)
ui - the UIpublic void open(java.lang.String location, java.lang.String target, java.lang.Runnable onFailure)
If openning the window fails, the given callback is called.
location - the URL to open in the new windowtarget - the target window nameonFailure - the callback to call if opening the window fails