Class AbstractFormDialog<T extends Serializable>

    • Constructor Detail

      • AbstractFormDialog

        public AbstractFormDialog​(String id,
                                  String title)
        Constructor
        Parameters:
        id - the markup id
        title - the dialog's title
      • AbstractFormDialog

        public AbstractFormDialog​(String id,
                                  IModel<String> title)
        Constructor
        Parameters:
        id - the markup id
        title - the dialog's title
      • AbstractFormDialog

        public AbstractFormDialog​(String id,
                                  String title,
                                  IModel<T> model)
        Constructor
        Parameters:
        id - the markup id
        title - the dialog's title
        model - the dialog's model
      • AbstractFormDialog

        public AbstractFormDialog​(String id,
                                  IModel<String> title,
                                  IModel<T> model)
        Constructor
        Parameters:
        id - the markup id
        title - the dialog's title
        model - the dialog's model
      • AbstractFormDialog

        public AbstractFormDialog​(String id,
                                  String title,
                                  boolean modal)
        Constructor
        Parameters:
        id - the markup id
        title - the dialog's title
        modal - indicates whether the dialog is modal
      • AbstractFormDialog

        public AbstractFormDialog​(String id,
                                  IModel<String> title,
                                  boolean modal)
        Constructor
        Parameters:
        id - the markup id
        title - the dialog's title
        modal - indicates whether the dialog is modal
      • AbstractFormDialog

        public AbstractFormDialog​(String id,
                                  String title,
                                  IModel<T> model,
                                  boolean modal)
        Constructor
        Parameters:
        id - the markup id
        title - the dialog's title
        model - the dialog's model
        modal - indicates whether the dialog is modal
      • AbstractFormDialog

        public AbstractFormDialog​(String id,
                                  IModel<String> title,
                                  IModel<T> model,
                                  boolean modal)
        Constructor
        Parameters:
        id - the markup id
        title - the dialog's title
        model - the dialog's model
        modal - indicates whether the dialog is modal
    • Method Detail

      • getSubmitButton

        public abstract DialogButton getSubmitButton()
        Gets the button that is in charge to submit the form.
        It should be in the list of buttons returned by AbstractDialog.getButtons()
        Returns:
        the submit button
      • getDefaultFormProcessing

        public boolean getDefaultFormProcessing()
        Returns whether form should be processed the default way. When false (default is true), all validation and form updating is bypassed and the onSubmit method of that button is called directly, and the onSubmit method of the parent form is not called. A common use for this is to create a cancel button.
        Returns:
        defaultFormProcessing
      • getForm

        public abstract Form<?> getForm()
        Gets the form to be validated by this dialog.
        Warning, the onSubmit and the onError are being delegated to this dialog. However, it does not prevent the use of Form#onSubmit nor Form#onError
        Returns:
        the form
      • getForm

        protected Form<?> getForm​(DialogButton button)
        Gets the form associated to the button.
        It means that it will return the form if the button is the submit button and null otherwise. The callback script will differ depending on this.
        Parameters:
        button - the dialog's button
        Returns:
        the Form or null