Class CmsFormDialog

java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.SimplePanel
com.google.gwt.user.client.ui.PopupPanel
org.opencms.gwt.client.ui.CmsPopup
org.opencms.gwt.client.ui.input.form.CmsFormDialog
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasCloseHandlers<com.google.gwt.user.client.ui.PopupPanel>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.EventPreview, com.google.gwt.user.client.ui.AcceptsOneWidget, com.google.gwt.user.client.ui.HasAnimation, com.google.gwt.user.client.ui.HasOneWidget, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.SourcesPopupEvents, Iterable<com.google.gwt.user.client.ui.Widget>, I_CmsAutoHider
Direct Known Subclasses:
CmsAttributesDialog, CmsElementSettingsDialog, CmsUserSettingsDialog

public class CmsFormDialog extends CmsPopup
A dialog containing a form.

Since:
8.0.0
  • Field Details

  • Constructor Details

    • CmsFormDialog

      public CmsFormDialog(String title, CmsForm form)
      Constructs a new form dialog with a given title.

      Parameters:
      title - the title of the form dialog
      form - the form to use
    • CmsFormDialog

      public CmsFormDialog(String title, CmsForm form, Integer dialogWidthObj)
      Constructs a new form dialog with a given title.

      Parameters:
      title - the title of the form dialog
      form - the form to use
      dialogWidthObj - the dialog width (if null, don't set any width; if negative, set default width)
  • Method Details

    • center

      public void center()
      Overrides:
      center in class CmsPopup
      See Also:
    • getForm

      public CmsForm getForm()
      Gets the form of this dialog.

      Returns:
      the form of this dialog
    • getOkButton

      Returns the 'OK' button.

      Returns:
      the 'OK' button
    • setFormHandler

      public void setFormHandler(I_CmsFormHandler formHandler)
      Sets the form handler for this form dialog.

      Parameters:
      formHandler - the new form handler
    • setOkButtonEnabled

      public void setOkButtonEnabled(boolean enabled)
      Enables/disables the OK button.

      Parameters:
      enabled - if true, enables the OK button, else disables it
    • show

      public void show()
      Overrides:
      show in class CmsPopup
      See Also:
    • initContent

      protected void initContent()
      Initializes the form content.

    • onClickCancel

      protected void onClickCancel()
      Called when the cancel button is clicked.
    • onClickOk

      protected void onClickOk()
      The method which should be called when the user clicks on the OK button of the dialog.

    • registerPreviewHandler

      protected void registerPreviewHandler()
      Registers the 'Enter' and 'Esc' shortcut action handler.

    • removePreviewHandler

      protected void removePreviewHandler()
      Removes the 'Enter' and 'Esc' shortcut action handler.