Package org.opencms.ui.dialogs
Class CmsEmbeddedDialogContext
java.lang.Object
org.opencms.ui.dialogs.CmsEmbeddedDialogContext
- All Implemented Interfaces:
I_CmsDialogContext
Context for dialogs embedded into plain GWT modules.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencms.ui.I_CmsDialogContext
I_CmsDialogContext.ContextType -
Field Summary
Fields inherited from interface org.opencms.ui.I_CmsDialogContext
ATTR_SITEMAP_CONFIG_RESOURCE -
Constructor Summary
ConstructorsConstructorDescriptionCmsEmbeddedDialogContext(String appId, CmsEmbeddedDialogExtension extension, I_CmsDialogContext.ContextType contextType, List<CmsResource> resources, Map<String, String> parameters) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseWindow(boolean keepFrame) Closes the dialog window.voidSignals an error which occurred in the dialog.voidfinish(Collection<CmsUUID> result) Signals that the dialog has finished.voidfinish(CmsProject project, String siteRoot) Signals that the dialog has finished.voidOpens the location from the site selector option.voidfinishWithString(String str) Finishes the dialog and returns an arbitrary string to the opener.voidTell the system that the resource with the given id should be shown somehow.Gets a list of structure ids of all visible resources, not just the ones selected for the dialog.getAppId()Returns the app id.protected I_CmsEmbeddedDialogClientRPCReturns the client RPC.getCms()Gets the CMS context to be used for dialog operations.Returns the context type.Gets additional parameters.Gets the list of resources for which the dialog should be opened.voidLeaves page by navigating to given URI.voidnavigateTo(String appId) Navigates to the given app.voidCall when the dialog view has changed to re-center the dialog window.voidreload()Reloads the UI.voidselectString(String principalName) Sets the principal.voidsendNotification(boolean error, String notification) Send a notification to the client to display.voidsetWindow(com.vaadin.ui.Window window) Sets the current window.voidCalled to start up the dialog with the given main widget and title string.voidstart(String title, com.vaadin.ui.Component dialog, CmsBasicDialog.DialogWidth width) Called to start up the dialog with the given main widget and title string.voidCalled when the user info was changed.
-
Constructor Details
-
CmsEmbeddedDialogContext
public CmsEmbeddedDialogContext(String appId, CmsEmbeddedDialogExtension extension, I_CmsDialogContext.ContextType contextType, List<CmsResource> resources, Map<String, String> parameters) Constructor.- Parameters:
appId- the app idextension- the extension used to communicate with the clientcontextType- the context typeresources- the resourcesparameters- the additional parameters
-
-
Method Details
-
closeWindow
Closes the dialog window.- Parameters:
keepFrame-trueto keep the embedded iFrame.
-
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:
-
finish
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:
-
finish
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:
-
finish
Opens the location from the site selector option.- Parameters:
option- the site selector option
-
finishWithString
Finishes the dialog and returns an arbitrary string to the opener.- Parameters:
str- the string to pass to the opener
-
focus
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:
-
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:
-
getAppId
Description copied from interface:I_CmsDialogContextReturns the app id.- Specified by:
getAppIdin interfaceI_CmsDialogContext- Returns:
- the app id
- See Also:
-
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:
-
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:
-
getParameters
Description copied from interface:I_CmsDialogContextGets additional parameters.- Specified by:
getParametersin interfaceI_CmsDialogContext- Returns:
- the map of additional parameters
- See Also:
-
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:
-
leavePage
Leaves page by navigating to given URI.- Parameters:
uri- the URI to navigate to
-
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:
-
reload
Description copied from interface:I_CmsDialogContextReloads the UI.- Specified by:
reloadin interfaceI_CmsDialogContext- See Also:
-
selectString
Sets the principal.- Parameters:
principalName- the principal name
-
sendNotification
Send a notification to the client to display.- Parameters:
error- true if this is an error notificationnotification- the notification HTML
-
setWindow
Description copied from interface:I_CmsDialogContextSets the current window.- Specified by:
setWindowin interfaceI_CmsDialogContext- Parameters:
window- the current dialog window- See Also:
-
start
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:
-
start
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:
-
updateUserInfo
Description copied from interface:I_CmsDialogContextCalled when the user info was changed.- Specified by:
updateUserInfoin interfaceI_CmsDialogContext- See Also:
-
getClientRPC
Returns the client RPC.- Returns:
- the client RPC
-