Class AjaxFallbackButton

    • Constructor Detail

      • AjaxFallbackButton

        public AjaxFallbackButton​(String id,
                                  Form<?> form)
        Construct.
        Parameters:
        id -
        form -
      • AjaxFallbackButton

        public AjaxFallbackButton​(String id,
                                  IModel<String> model,
                                  Form<?> form)
        Construct.
        Parameters:
        id -
        model -
        form -
    • Method Detail

      • onError

        protected void onError​(Optional<AjaxRequestTarget> target)
        Listener method invoked on form submit with errors. If ajax failed and this event was generated via a normal submission, the target argument will be null.
        Parameters:
        target -
      • onError

        public final void onError()
        Description copied from interface: IFormSubmitter
        Method that is invoked when form processing fails; for example, when there are validation errors.
        Specified by:
        onError in interface IFormSubmitter
        Overrides:
        onError in class Button
      • onSubmit

        public final void onSubmit()
        Description copied from class: Button
        Override this method to provide special submit handling in a multi-button form. It is called whenever the user clicks this particular button, except if validation fails. This method will be called before Form.onSubmit().
        Specified by:
        onSubmit in interface IFormSubmitter
        Overrides:
        onSubmit in class Button
      • onAfterSubmit

        public final void onAfterSubmit()
        Description copied from class: Button
        Override this method to provide special submit handling in a multi-button form. It is called whenever the user clicks this particular button, except if validation fails. This method will be called after Form.onSubmit().
        Specified by:
        onAfterSubmit in interface IFormSubmitter
        Overrides:
        onAfterSubmit in class Button
      • getForm

        public Form<?> getForm()
        Description copied from class: Button
        Override to not throw exception if there is no parent form.
        Specified by:
        getForm in interface IFormSubmitter
        Overrides:
        getForm in class Button
        Returns:
        the parent form or null
      • onSubmit

        protected void onSubmit​(Optional<AjaxRequestTarget> target)
        Callback for the onClick event. If ajax failed and this event was generated via a normal submission, the target argument will be Optional.empty(). This method will be called before Form.onSubmit().
        Parameters:
        target - ajax target if this linked was invoked using ajax, Optional.empty() otherwise
      • onAfterSubmit

        protected void onAfterSubmit​(Optional<AjaxRequestTarget> target)
        Callback for the onClick event. If ajax failed and this event was generated via a normal submission, the target argument will be null. This method will be called after Form.onSubmit().
        Parameters:
        target - ajax target if this linked was invoked using ajax, null otherwise
      • isButtonEnabled

        protected final boolean isButtonEnabled()
        Helper methods that both checks whether the link is enabled and whether the action ENABLE is allowed.
        Returns:
        whether the link should be rendered as enabled
      • onComponentTag

        protected void onComponentTag​(ComponentTag tag)
        Description copied from class: Button
        Processes the component tag. A value attribute is added with the value of the model object, if available.

        NOTE. For a <button> the value attribute is not rendered, markup needs to be added within the button to display the button's label.

        Overrides:
        onComponentTag in class Button
        Parameters:
        tag - Tag to modify
        See Also:
        Component.onComponentTag(ComponentTag)