Package org.opencms.gwt.client.util
Class CmsEmbeddedDialogFrame
java.lang.Object
org.opencms.gwt.client.util.CmsEmbeddedDialogFrame
- All Implemented Interfaces:
I_CmsEmbeddedDialogFrame
Singleton that creates and manages access to the shared iframe used for embedded Vaadin dialogs, mainly in the page editor.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic I_CmsEmbeddedDialogFrame
get()
Gets the singleton instance.void
hide()
Hides the iframe.void
Sets the dialog loader.void
loadDialog
(String dialogInfoJson, I_CmsEmbeddedDialogHandlerJsCallbacks handler) Triggers loading of a new dialog in the iframe.void
preload()
Triggers initialization of the iframe.protected void
waitUntilReady
(Runnable action) Initializes the iframe if it isn't already, and executes the given action afterwards.
-
Constructor Details
-
CmsEmbeddedDialogFrame
protected CmsEmbeddedDialogFrame()Hidden default constructor.
-
-
Method Details
-
get
Gets the singleton instance.- Returns:
- the instance
-
hide
Description copied from interface:I_CmsEmbeddedDialogFrame
Hides the iframe.- Specified by:
hide
in interfaceI_CmsEmbeddedDialogFrame
- See Also:
-
installEmbeddedDialogLoader
Sets the dialog loader.This is called by the Javascript code in the iframe.
- Specified by:
installEmbeddedDialogLoader
in interfaceI_CmsEmbeddedDialogFrame
- Parameters:
loader
- the class used to load dialogs in the iframe itself
-
loadDialog
Description copied from interface:I_CmsEmbeddedDialogFrame
Triggers loading of a new dialog in the iframe.If the iframe has not been created/initialized yet, this will trigger the initialization and load the dialog afterwards.
- Specified by:
loadDialog
in interfaceI_CmsEmbeddedDialogFrame
- Parameters:
dialogInfoJson
- the serialized dialog info JSON from an I_CmsEmbeddedDialogInfo beanhandler
- the embedded dialog handler- See Also:
-
preload
Description copied from interface:I_CmsEmbeddedDialogFrame
Triggers initialization of the iframe.- Specified by:
preload
in interfaceI_CmsEmbeddedDialogFrame
- See Also:
-
waitUntilReady
Initializes the iframe if it isn't already, and executes the given action afterwards.- Parameters:
action
- the action to execute after the iframe is initialized
-