Package org.opencms.gwt.client.util
Class CmsEmbeddedDialogFrame
- java.lang.Object
-
- org.opencms.gwt.client.util.CmsEmbeddedDialogFrame
-
- All Implemented Interfaces:
I_CmsEmbeddedDialogFrame
public class CmsEmbeddedDialogFrame extends java.lang.Object implements I_CmsEmbeddedDialogFrame
Singleton that creates and manages access to the shared iframe used for embedded Vaadin dialogs, mainly in the page editor.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CmsEmbeddedDialogFrame()
Hidden default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static I_CmsEmbeddedDialogFrame
get()
Gets the singleton instance.void
hide()
Hides the iframe.void
installEmbeddedDialogLoader(I_CmsEmbeddedDialogLoader loader)
Sets the dialog loader.void
loadDialog(java.lang.String dialogInfoJson, I_CmsEmbeddedDialogHandlerJsCallbacks handler)
Triggers loading of a new dialog in the iframe.void
preload()
Triggers initialization of the iframe.protected void
waitUntilReady(java.lang.Runnable action)
Initializes the iframe if it isn't already, and executes the given action afterwards.
-
-
-
Constructor Detail
-
CmsEmbeddedDialogFrame
protected CmsEmbeddedDialogFrame()
Hidden default constructor.
-
-
Method Detail
-
get
public static I_CmsEmbeddedDialogFrame get()
Gets the singleton instance.- Returns:
- the instance
-
hide
public void hide()
Description copied from interface:I_CmsEmbeddedDialogFrame
Hides the iframe.- Specified by:
hide
in interfaceI_CmsEmbeddedDialogFrame
- See Also:
I_CmsEmbeddedDialogFrame.hide()
-
installEmbeddedDialogLoader
public void installEmbeddedDialogLoader(I_CmsEmbeddedDialogLoader loader)
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
public void loadDialog(java.lang.String dialogInfoJson, I_CmsEmbeddedDialogHandlerJsCallbacks handler)
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:
I_CmsEmbeddedDialogFrame.loadDialog(java.lang.String, org.opencms.gwt.client.util.I_CmsEmbeddedDialogHandlerJsCallbacks)
-
preload
public void preload()
Description copied from interface:I_CmsEmbeddedDialogFrame
Triggers initialization of the iframe.- Specified by:
preload
in interfaceI_CmsEmbeddedDialogFrame
- See Also:
I_CmsEmbeddedDialogFrame.preload()
-
waitUntilReady
protected void waitUntilReady(java.lang.Runnable action)
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
-
-