|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.server.AbstractClientConnector
com.vaadin.server.AbstractExtension
com.vaadin.server.BrowserWindowOpener
public class BrowserWindowOpener
Component extension that opens a browser popup window when the extended component is clicked.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector |
|---|
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener |
| Constructor Summary | |
|---|---|
BrowserWindowOpener(java.lang.Class<? extends UI> uiClass)
Creates a window opener that will open windows containing the provided UI class |
|
BrowserWindowOpener(java.lang.Class<? extends UI> uiClass,
java.lang.String path)
Creates a window opener that will open windows containing the provided UI using the provided path |
|
BrowserWindowOpener(Resource resource)
Creates a window opener that will open window to the provided resource |
|
BrowserWindowOpener(java.lang.String url)
Creates a window opener that will open windows to the provided URL |
|
| Method Summary | |
|---|---|
void |
attach()
Notifies the connector that it is connected to an application. |
void |
detach()
Notifies the connector that it is detached from the application. |
void |
extend(AbstractComponent target)
|
java.lang.String |
getFeatures()
Gets the window features. |
java.lang.String |
getParameter(java.lang.String name)
Gets the value of a parameter set using setParameter(String, String). |
java.util.Set<java.lang.String> |
getParameterNames()
Gets the names of all parameters set using setParameter(String, String). |
protected com.vaadin.shared.ui.BrowserWindowOpenerState |
getState()
Returns the shared state for this connector. |
java.lang.String |
getUriFragment()
Gets that URI fragment configured for opened windows. |
java.lang.String |
getWindowName()
Gets the target window name. |
void |
removeParameter(java.lang.String name)
Removes a parameter that has been set using setParameter(String, String). |
void |
setFeatures(java.lang.String features)
Sets the features for opening the window. |
void |
setParameter(java.lang.String name,
java.lang.String value)
Sets a parameter that will be added to the query string of the opened URI. |
void |
setUriFragment(java.lang.String uriFragment)
Sets a URI fragment that will be added to the URI opened in the window. |
void |
setWindowName(java.lang.String windowName)
Sets the target window name that will be used. |
| Methods inherited from class com.vaadin.server.AbstractExtension |
|---|
extend, getSupportedParentType, remove, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.vaadin.server.ClientConnector |
|---|
addAttachListener, addDetachListener, beforeClientResponse, encodeState, getErrorHandler, getExtensions, getParent, getRpcManager, getStateType, getUI, handleConnectorRequest, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler |
| Methods inherited from interface com.vaadin.shared.Connector |
|---|
getConnectorId |
| Constructor Detail |
|---|
public BrowserWindowOpener(java.lang.Class<? extends UI> uiClass)
uiClass - the UI class that should be opened when the extended component
is clicked
public BrowserWindowOpener(java.lang.Class<? extends UI> uiClass,
java.lang.String path)
uiClass - the UI class that should be opened when the extended component
is clickedpath - the path that the UI should be bound topublic BrowserWindowOpener(java.lang.String url)
url - the URL to open in the windowpublic BrowserWindowOpener(Resource resource)
resource - the resource to open in the window| Method Detail |
|---|
public void extend(AbstractComponent target)
public void setWindowName(java.lang.String windowName)
null or "_blank", a new window will always be
opened.
windowName - the target name for the windowpublic java.lang.String getWindowName()
setWindowName(String)public void setFeatures(java.lang.String features)
https://developer.mozilla.org/en-US/docs/DOM/window.open#Position_and_size_features
for a description of the commonly supported features.
features - a string with window features, or null to use the default features.public java.lang.String getFeatures()
setFeatures(String)protected com.vaadin.shared.ui.BrowserWindowOpenerState getState()
AbstractClientConnector
As a side effect, marks the connector dirty so any changes done to the
state will be sent to the client. Use getState(false) to avoid
marking the connector as dirty.
getState in class AbstractClientConnectorpublic void attach()
ClientConnector
The caller of this method is ClientConnector.setParent(ClientConnector) if the
parent is itself already attached to the application. If not, the parent
will call the ClientConnector.attach() for all its children when it is attached
to the application. This method is always called before the connector's
data is sent to the client-side for the first time.
The attachment logic is implemented in AbstractClientConnector.
attach in interface ClientConnectorattach in class AbstractClientConnectorpublic void detach()
AbstractClientConnector
The caller of this method is ClientConnector.setParent(ClientConnector) if the
parent is in the application. When the parent is detached from the
application it is its responsibility to call ClientConnector.detach() for each
of its children.
The AbstractClientConnector.getSession() and AbstractClientConnector.getUI() methods might return
null after this method is called.
detach in interface ClientConnectordetach in class AbstractClientConnectorpublic void setUriFragment(java.lang.String uriFragment)
Page.getUriFragment() on the Page instance of the
new UI.
The default value is null.
uriFragment - the URI fragment string that should be included in the opened
URI, or null to preserve the original fragment of
the URI.public java.lang.String getUriFragment()
null if no fragment is
configured.setUriFragment(String)
public void setParameter(java.lang.String name,
java.lang.String value)
VaadinRequest.getParameter(String) e.g. using
the request instance passed to UI.init(VaadinRequest).
Setting a parameter with the same name as a previously set parameter will replace the previous value.
name - the name of the parameter to add, not nullvalue - the value of the parameter to add, not nullremoveParameter(String),
getParameterNames(),
getParameter(String)public void removeParameter(java.lang.String name)
setParameter(String, String). Removing a parameter that has not
been set has no effect.
name - the name of the parameter to remove, not nullsetParameter(String, String)public java.util.Set<java.lang.String> getParameterNames()
setParameter(String, String).
setParameter(String, String),
getParameter(String)public java.lang.String getParameter(java.lang.String name)
setParameter(String, String). If there is no parameter with the
given name, null is returned.
name - the name of the parameter to get, not null
null there is no
parametersetParameter(String, String),
getParameter(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||