Package org.opencms.ui.dialogs
Class CmsEmbeddedDialogContext
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.server.AbstractExtension
-
- org.opencms.ui.dialogs.CmsEmbeddedDialogContext
-
- All Implemented Interfaces:
com.vaadin.event.MethodEventSource,com.vaadin.server.ClientConnector,com.vaadin.server.Extension,com.vaadin.shared.Connector,java.io.Serializable,I_CmsDialogContext
public class CmsEmbeddedDialogContext extends com.vaadin.server.AbstractExtension implements I_CmsDialogContext
Context for dialogs embedded into plain GWT modules.- 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
-
Nested classes/interfaces inherited from interface org.opencms.ui.I_CmsDialogContext
I_CmsDialogContext.ContextType
-
-
Constructor Summary
Constructors Constructor Description CmsEmbeddedDialogContext(java.lang.String appId, I_CmsDialogContext.ContextType contextType, java.util.List<CmsResource> resources)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseWindow(boolean keepFrame)Closes the dialog window.voiderror(java.lang.Throwable error)Signals an error which occurred in the dialog.voidfinish(java.util.Collection<CmsUUID> result)Signals that the dialog has finished.voidfinish(CmsProject project, java.lang.String siteRoot)Signals that the dialog has finished.voidfinish(CmsExtendedSiteSelector.SiteSelectorOption option)Opens the location from the site selector option.voidfinishWithString(java.lang.String str)Finishes the dialog and returns an arbitrary string to the opener.voidfocus(CmsUUID structureId)Tell the system that the resource with the given id should be shown somehow.java.util.List<CmsUUID>getAllStructureIdsInView()Gets a list of structure ids of all visible resources, not just the ones selected for the dialog.java.lang.StringgetAppId()Returns the app id.protected I_CmsEmbeddedDialogClientRPCgetClientRPC()Returns the client RPC.CmsObjectgetCms()Gets the CMS context to be used for dialog operations.I_CmsDialogContext.ContextTypegetContextType()Returns the context type.java.util.List<CmsResource>getResources()Gets the list of resources for which the dialog should be opened.voidleavePage(java.lang.String uri)Leaves page by navigating to given URI.voidnavigateTo(java.lang.String appId)Navigates to the given app.voidonViewChange()Call when the dialog view has changed to re-center the dialog window.voidreload()Reloads the UI.voidselectString(java.lang.String principalName)Sets the principal.voidsetWindow(com.vaadin.ui.Window window)Sets the current window.voidstart(java.lang.String title, com.vaadin.ui.Component dialog)Called to start up the dialog with the given main widget and title string.voidstart(java.lang.String title, com.vaadin.ui.Component dialog, CmsBasicDialog.DialogWidth width)Called to start up the dialog with the given main widget and title string.voidupdateUserInfo()Called when the user info was changed.-
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
-
-
-
-
Constructor Detail
-
CmsEmbeddedDialogContext
public CmsEmbeddedDialogContext(java.lang.String appId, I_CmsDialogContext.ContextType contextType, java.util.List<CmsResource> resources)
Constructor.- Parameters:
appId- the app idcontextType- the context typeresources- the resources
-
-
Method Detail
-
closeWindow
public void closeWindow(boolean keepFrame)
Closes the dialog window.- Parameters:
keepFrame-trueto keep the embedded iFrame.
-
error
public void error(java.lang.Throwable error)
Description copied from interface:I_CmsDialogContextSignals an error which occurred in the dialog.- Specified by:
errorin interfaceI_CmsDialogContext- Parameters:
error- the error which occcurred- See Also:
I_CmsDialogContext.error(java.lang.Throwable)
-
finish
public void finish(CmsProject project, java.lang.String siteRoot)
Description copied from interface:I_CmsDialogContextSignals that the dialog has finished.Call when current project and or site have been changed.
- Specified by:
finishin interfaceI_CmsDialogContext- Parameters:
project- changed projectsiteRoot- changed site root- See Also:
I_CmsDialogContext.finish(org.opencms.file.CmsProject, java.lang.String)
-
finish
public void finish(java.util.Collection<CmsUUID> result)
Description copied from interface:I_CmsDialogContextSignals that the dialog has finished.- Specified by:
finishin interfaceI_CmsDialogContext- Parameters:
result- the list of structure ids of changed resources- See Also:
I_CmsDialogContext.finish(java.util.Collection)
-
finish
public void finish(CmsExtendedSiteSelector.SiteSelectorOption option)
Opens the location from the site selector option.- Parameters:
option- the site selector option
-
finishWithString
public void finishWithString(java.lang.String str)
Finishes the dialog and returns an arbitrary string to the opener.- Parameters:
str- the string to pass to the opener
-
focus
public void focus(CmsUUID structureId)
Description copied from interface:I_CmsDialogContextTell the system that the resource with the given id should be shown somehow.- Specified by:
focusin interfaceI_CmsDialogContext- Parameters:
structureId- the structure id of a resource- See Also:
I_CmsDialogContext.focus(org.opencms.util.CmsUUID)
-
getAllStructureIdsInView
public java.util.List<CmsUUID> getAllStructureIdsInView()
Description copied from interface:I_CmsDialogContextGets a list of structure ids of all visible resources, not just the ones selected for the dialog.- Specified by:
getAllStructureIdsInViewin interfaceI_CmsDialogContext- Returns:
- the structure ids of all the resources in the current view
- See Also:
I_CmsDialogContext.getAllStructureIdsInView()
-
getAppId
public java.lang.String getAppId()
Description copied from interface:I_CmsDialogContextReturns the app id.- Specified by:
getAppIdin interfaceI_CmsDialogContext- Returns:
- the app id
- See Also:
I_CmsDialogContext.getAppId()
-
getCms
public CmsObject getCms()
Description copied from interface:I_CmsDialogContextGets the CMS context to be used for dialog operations.- Specified by:
getCmsin interfaceI_CmsDialogContext- Returns:
- the CMS context
- See Also:
I_CmsDialogContext.getCms()
-
getContextType
public I_CmsDialogContext.ContextType getContextType()
Description copied from interface:I_CmsDialogContextReturns the context type.May be used for visibility evaluation.
- Specified by:
getContextTypein interfaceI_CmsDialogContext- Returns:
- the context type
- See Also:
I_CmsDialogContext.getContextType()
-
getResources
public java.util.List<CmsResource> getResources()
Description copied from interface:I_CmsDialogContextGets the list of resources for which the dialog should be opened.- Specified by:
getResourcesin interfaceI_CmsDialogContext- Returns:
- the list of resources
- See Also:
I_CmsDialogContext.getResources()
-
leavePage
public void leavePage(java.lang.String uri)
Leaves page by navigating to given URI.- Parameters:
uri- the URI to navigate to
-
navigateTo
public void navigateTo(java.lang.String appId)
Description copied from interface:I_CmsDialogContextNavigates to the given app.- Specified by:
navigateToin interfaceI_CmsDialogContext- Parameters:
appId- the app id- See Also:
I_CmsDialogContext.navigateTo(java.lang.String)
-
onViewChange
public void onViewChange()
Description copied from interface:I_CmsDialogContextCall when the dialog view has changed to re-center the dialog window.- Specified by:
onViewChangein interfaceI_CmsDialogContext- See Also:
I_CmsDialogContext.onViewChange()
-
reload
public void reload()
Description copied from interface:I_CmsDialogContextReloads the UI.- Specified by:
reloadin interfaceI_CmsDialogContext- See Also:
I_CmsDialogContext.reload()
-
selectString
public void selectString(java.lang.String principalName)
Sets the principal.- Parameters:
principalName- the principal name
-
setWindow
public void setWindow(com.vaadin.ui.Window window)
Description copied from interface:I_CmsDialogContextSets the current window.- Specified by:
setWindowin interfaceI_CmsDialogContext- Parameters:
window- the current dialog window- See Also:
I_CmsDialogContext.setWindow(com.vaadin.ui.Window)
-
start
public void start(java.lang.String title, com.vaadin.ui.Component dialog)
Description copied from interface:I_CmsDialogContextCalled to start up the dialog with the given main widget and title string.- Specified by:
startin interfaceI_CmsDialogContext- Parameters:
title- the title to displaydialog- the dialog main widget- See Also:
I_CmsDialogContext.start(java.lang.String, com.vaadin.ui.Component)
-
start
public void start(java.lang.String title, com.vaadin.ui.Component dialog, CmsBasicDialog.DialogWidth width)
Description copied from interface:I_CmsDialogContextCalled to start up the dialog with the given main widget and title string.- Specified by:
startin interfaceI_CmsDialogContext- Parameters:
title- the title to displaydialog- the dialog main widgetwidth- the preferred width for the dialog- See Also:
I_CmsDialogContext.start(java.lang.String, com.vaadin.ui.Component, org.opencms.ui.components.CmsBasicDialog.DialogWidth)
-
updateUserInfo
public void updateUserInfo()
Description copied from interface:I_CmsDialogContextCalled when the user info was changed.- Specified by:
updateUserInfoin interfaceI_CmsDialogContext- See Also:
I_CmsDialogContext.updateUserInfo()
-
getClientRPC
protected I_CmsEmbeddedDialogClientRPC getClientRPC()
Returns the client RPC.- Returns:
- the client RPC
-
-