Class 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, java.lang.Iterable<com.google.gwt.user.client.ui.Widget>, I_CmsAutoHider
    Direct Known Subclasses:
    CmsElementSettingsDialog, CmsUserSettingsDialog

    public class CmsFormDialog
    extends CmsPopup
    A dialog containing a form.

    Since:
    8.0.0
    • Constructor Detail

      • CmsFormDialog

        public CmsFormDialog​(java.lang.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​(java.lang.String title,
                             CmsForm form,
                             java.lang.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 Detail

      • getForm

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

        Returns:
        the form of this dialog
      • 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
      • 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.