Hi,

The provided information is not enough to help you.
Which version of Wicket do you use ?
Do you have other buttons in this form ?
Is Form#onError() called ?

Put a breakpoint in Form#onFormSubmitted() and follow to see where it goes.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Jul 28, 2017 at 11:12 PM, Entropy <[email protected]> wrote:

> We have an AjaxButton, some fields are failing required check, but the
> onError of the button is not being invoked.  This means we can't add the
> container to the target, and therefore the ComponentFeedbackPanel is not
> rendering with the message.
>
>     radioWmc2Step1.add(new AjaxButton("btnResSend", form)
>     {
>                         @Override
>                         protected void onSubmit(AjaxRequestTarget target,
> Form form) {
>                                 log.debug("btnResSend");
>                                 
> logUserAction(ocpAuthorization.getEmailAddress(),
> "601", "CP10", "OCP",
> "Send PIN");
>                                 onSendPin();
>                           radioWmc2Step1.setVisible(false);
>                           radioWmc2Step2.setVisible(true);
>
>                           target.add(radioWmc2Step1);
>                           target.add(radioWmc2Step2);
>                         }
>
>                         @Override
>                         protected void onError(AjaxRequestTarget target,
> Form form) {
>                           //does not fire on required message
>                           target.add(radioWmc2Step1);
>                         };
>                 }
>                 .setOutputMarkupId(true)
>                 .setOutputMarkupPlaceholderTag(true)
>                  );
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/AjaxButton-not-calling-onError-after-
> required-validation-fail-tp4678346.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to