You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by anotherUser <ju...@theiaconsulting.com> on 2013/03/14 15:56:32 UTC
Wicket 1.4.x - AjaxSubmitLink doesn't work
Hi this my first post here, let's see my problem:
i am adding a AjaxSubmitLink in a Listview like this:
AjaxSubmitLink lnkAgregar = new AjaxSubmitLink("lnkDetalle", form) {
@Override
protected void onSubmit(AjaxRequestTarget art, Form<?> form) {
....
}
};
lnkAgregar.setMarkupId("LNKDETALLE_A_" + fDetalle.getId());
when i tried to click this link
Wicket Ajax Debug Windows show me:
NFO: Ajax POST stopped because of precondition check,
url:?wicket:interface=:3:templateCircuitoFirmasForm:containerLW:lwTemplateFirmasDetalle:1:lnkAgregarDetalle::IActivePageBehaviorListener:0:-1&wicket:ignoreIfNotActive=true
This was because, fDetalle.getId() was null, i comment this line and resolve
the problem
lnkAgregar.setMarkupId("LNKDETALLE_A_" + fDetalle.getId());
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-4-x-AjaxSubmitLink-doesn-t-work-tp4657243.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket 1.4.x - AjaxSubmitLink doesn't work
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
On Thu, Mar 14, 2013 at 3:56 PM, anotherUser <
juan.dellagnolo@theiaconsulting.com> wrote:
> Hi this my first post here, let's see my problem:
>
Welcome !
> i am adding a AjaxSubmitLink in a Listview like this:
>
> AjaxSubmitLink lnkAgregar = new AjaxSubmitLink("lnkDetalle", form) {
>
> @Override
> protected void onSubmit(AjaxRequestTarget art, Form<?> form) {
> ....
> }
> };
> lnkAgregar.setMarkupId("LNKDETALLE_A_" + fDetalle.getId());
>
> when i tried to click this link
> Wicket Ajax Debug Windows show me:
> NFO: Ajax POST stopped because of precondition check,
>
> url:?wicket:interface=:3:templateCircuitoFirmasForm:containerLW:lwTemplateFirmasDetalle:1:lnkAgregarDetalle::IActivePageBehaviorListener:0:-1&wicket:ignoreIfNotActive=true
>
> This was because, fDetalle.getId() was null, i comment this line and
> resolve
> the problem
> lnkAgregar.setMarkupId("LNKDETALLE_A_" + fDetalle.getId());
>
>
And the question is, I guess, why ?
A: Because Wicket makes a check that the HTML element that triggers the JS
event and the form to be submitted are in the DOM document. I suppose there
are several links with the same markup id - LNKDETALLE_A_null.
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-1-4-x-AjaxSubmitLink-doesn-t-work-tp4657243.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>