Hi,
On Thu, Mar 14, 2013 at 3:56 PM, anotherUser < [email protected]> 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: [email protected] > For additional commands, e-mail: [email protected] > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>
