Class CmsWindowExtension

  • All Implemented Interfaces:
    com.vaadin.event.MethodEventSource, com.vaadin.server.ClientConnector, com.vaadin.server.Extension, com.vaadin.shared.Connector,

    public class CmsWindowExtension
    extends com.vaadin.server.AbstractExtension
    Extension used to open new browser windows.

    While 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.

    See Also:
    Serialized Form
    • Nested Class Summary

      • 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
    • Constructor Summary

      Constructor Description
      CmsWindowExtension​(com.vaadin.ui.UI ui)
      Creates a new instance and binds it to the given UI.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void open​(java.lang.String location, java.lang.String target, java.lang.Runnable onFailure)
      Tries to open a new browser window.
      • Methods inherited from class com.vaadin.server.AbstractExtension

        extend, getParent, getSupportedParentType, remove, setParent
      • Methods inherited from class com.vaadin.server.AbstractClientConnector

        addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, 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, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, 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, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
      • Methods inherited from interface com.vaadin.shared.Connector

    • Constructor Detail

      • CmsWindowExtension

        public CmsWindowExtension​(com.vaadin.ui.UI ui)
        Creates a new instance and binds it to the given UI.

        ui - the UI
    • Method Detail

      • open

        public void open​(java.lang.String location,
                         java.lang.String target,
                         java.lang.Runnable onFailure)
        Tries to open a new browser window.

        If openning the window fails, the given callback is called.

        location - the URL to open in the new window
        target - the target window name
        onFailure - the callback to call if opening the window fails