Class AjaxFormSubmitBehavior

    • Constructor Detail

      • AjaxFormSubmitBehavior

        public AjaxFormSubmitBehavior​(java.lang.String event)
        Constructor. This constructor can only be used when the component this behavior is attached to is inside a form.
        Parameters:
        event - javascript event this behavior is attached to, like onclick
      • AjaxFormSubmitBehavior

        public AjaxFormSubmitBehavior​(Form<?> form,
                                      java.lang.String event)
        Construct.
        Parameters:
        form - form that will be submitted
        event - javascript event this behavior is attached to, like onclick
    • Method Detail

      • getForm

        public final Form<?> getForm()
        Returns:
        Form that will be submitted by this behavior
      • findForm

        protected Form<?> findForm()
        Finds form that will be submitted
        Returns:
        form to submit or null if none found
      • onAfterSubmit

        protected void onAfterSubmit​(AjaxRequestTarget target)
        Override this method to provide special submit handling in a multi-button form. This method will be called after the form's onSubmit method.
        Parameters:
        target - the AjaxRequestTarget
      • onSubmit

        protected void onSubmit​(AjaxRequestTarget target)
        Override this method to provide special submit handling in a multi-button form. This method will be called before the form's onSubmit method.
        Parameters:
        target - the AjaxRequestTarget
      • onError

        protected void onError​(AjaxRequestTarget target)
        Listener method invoked when the form has been processed and errors occurred
        Parameters:
        target -