Class CmsContentEditorDialog

java.lang.Object
org.opencms.gwt.client.ui.contenteditor.CmsContentEditorDialog

public final class CmsContentEditorDialog extends Object
XML content editor dialog.

Since:
8.0.0
  • Method Details

    • generateForm

      public static com.google.gwt.dom.client.FormElement generateForm(I_CmsEditableData editableData, boolean isNew, String target, String mode)
      Generates the form to post to the editor frame.

      Parameters:
      editableData - the data about the resource which should be edited
      isNew - true if the resource to be edited doesn'T already exist
      target - the target of the form to be created
      mode - 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, String mode, CmsContentEditorDialog.DialogOptions dlgOptions, I_CmsContentEditorHandler editorHandler)
      Opens the content editor dialog for the given element.

      Parameters:
      editableData - the editable data
      isNew - true when creating a new resource
      mode - the content creation mode
      dlgOptions - the additional dialog options
      editorHandler - the editor handler
    • close

      protected void close()
      Closes the dialog.

    • 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