Why do you mean that are exactly the same?

Just an idea see the markup of the buttons and check that they do not have
the same id="xxxx": otherwise they are just the the same at HTML level...
and before wicket 1.5 actions were attached to button on an onClick and
after that as jquery.bind(....).

@Martin.

Please correct me if I'm saying something wrong?

On Thu, Feb 4, 2016 at 11:34 PM, sameerkhanna <[email protected]>
wrote:

> Hi,
>
> We recently upgraded from wicket 1.3 to wicket 6. However, it was a step by
> step upgrade for each major version.
>
> I have a form in my application that has components being added to a
> RepeatingView. For the particular page where I am facing the issues, we
> have
> 2 child components that are exactly the same (a couple of text fields and a
> button). The buttons have ajax behavior attached to them. On click of these
> buttons, we could add more components to the form (e.g. for additional
> beneficiaries in a policy). Now the issue that am facing is that the
> onSubmit method for the first button gets called when it is clicked but
> nothing happens when I click on the 2nd button. It is exactly the same part
> of code base for both the components -
>
> AjaxButton addButton = new AjaxButton("e_add_button") {
>
>                                         protected void
> onSubmit(AjaxRequestTarget target, Form form){
>
> BeneficiaryComp.this.addComponent(target);
>                                         }
>                                         protected void
> onError(AjaxRequestTarget target, Form form){
>
> BeneficiaryComp.this.addComponent(target);
>                                         }
>
>                                 };
>
> No request is triggered on click of the second button and I don't see any
> stack trace as well. I am kinda clueless for what might be happening.
>
> I am not sure if I faced this issue during the upgrade from 1.3 to 1.4 or
> 1.4 to 1.5 as this scenario was not tested then.
>
> Any help would be much appreciated. Thanks!
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-15-onSubmit-not-getting-called-for-AjaxButton-tp4673516.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]
>
>


-- 
Regards - Ernesto Reinaldo Barreiro

Reply via email to