Class CmsContentEditorDialog
- java.lang.Object
-
- org.opencms.gwt.client.ui.contenteditor.CmsContentEditorDialog
-
public final class CmsContentEditorDialog extends java.lang.Object
XML content editor dialog.- Since:
- 8.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsContentEditorDialog.DialogOptions
Additional options for the editor dialog.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
close()
Closes the dialog.static com.google.gwt.dom.client.FormElement
generateForm(I_CmsEditableData editableData, boolean isNew, java.lang.String target, java.lang.String mode)
Generates the form to post to the editor frame.static CmsContentEditorDialog
get()
Returns the dialogs instance.protected I_CmsEditableData
getEditableData()
Returns the editable data.protected void
onWindowClose()
Execute on window close.protected void
openDialog(CmsContentEditorDialog.DialogOptions dlgOptions)
Opens the dialog for the given sitepath.void
openEditDialog(I_CmsEditableData editableData, boolean isNew, java.lang.String mode, CmsContentEditorDialog.DialogOptions dlgOptions, I_CmsContentEditorHandler editorHandler)
Opens the content editor dialog for the given element.
-
-
-
Method Detail
-
generateForm
public static com.google.gwt.dom.client.FormElement generateForm(I_CmsEditableData editableData, boolean isNew, java.lang.String target, java.lang.String mode)
Generates the form to post to the editor frame.- Parameters:
editableData
- the data about the resource which should be editedisNew
- true if the resource to be edited doesn'T already existtarget
- the target of the form to be createdmode
- the mode for creating new elements- Returns:
- the form element which, when submitted, opens the editor
-
get
public static CmsContentEditorDialog get()
Returns the dialogs instance.- Returns:
- the dialog instance
-
openEditDialog
public void openEditDialog(I_CmsEditableData editableData, boolean isNew, java.lang.String mode, CmsContentEditorDialog.DialogOptions dlgOptions, I_CmsContentEditorHandler editorHandler)
Opens the content editor dialog for the given element.- Parameters:
editableData
- the editable dataisNew
-true
when creating a new resourcemode
- the content creation modedlgOptions
- the additional dialog optionseditorHandler
- the editor handler
-
close
protected void close()
Closes the dialog.
-
getEditableData
protected I_CmsEditableData getEditableData()
Returns the editable data.- Returns:
- the editable data
-
onWindowClose
protected void onWindowClose()
Execute on window close.Will ask the user if the edited content should be saved.
-
openDialog
protected void openDialog(CmsContentEditorDialog.DialogOptions dlgOptions)
Opens the dialog for the given sitepath.- Parameters:
dlgOptions
- the additional dialog options
-
-