You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Entropy <bl...@gmail.com> on 2017/02/15 17:51:39 UTC
AjaxSubmitLink not working
I have a header links section in my header that must build in a dynamic way.
AjaxSubmitLink link = new AjaxSubmitLink(linkName, formToSubmit) {
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
//control never gets here.
}
};
That is being built in a function call that is called from a loop (though I
don't think that matters). The HTML (of one example):
<li wicket:id="contactLi"><a wicket:id="contactLink"
href="/contact">Contact Information</a></li>
In the wicket ajax debug window, I am getting this:
INFO: focus removed from
INFO: focus set on startLinkc
INFO: Received ajax response (69 characters)
INFO:
<?xml version="1.0" encoding="UTF-8"?><ajax-response></ajax-response>
INFO: Response processed successfully.
INFO: refocus last focused component not needed/allowed
Implying that it ran, but did nothing? There are no validators in place
(yet) on the form.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxSubmitLink-not-working-tp4677120.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: AjaxSubmitLink not working
Posted by "Richard W. Adams" <RW...@UP.COM>.
This may not be the issue, but it's good practice to always include an
onError method in the anonymous class. Once you add that, put a break
point there & see what turns up.
From: Entropy <bl...@gmail.com>
To: users@wicket.apache.org
Date: 02/15/2017 11:55 AM
Subject: AjaxSubmitLink not working
This email originated from outside of the company. Please use discretion
if opening attachments or clicking on links.
I have a header links section in my header that must build in a dynamic
way.
AjaxSubmitLink link = new
AjaxSubmitLink(linkName, formToSubmit) {
@Override
public void
onSubmit(AjaxRequestTarget target, Form form) {
//control never gets here.
}
};
That is being built in a function call that is called from a loop (though
I
don't think that matters). The HTML (of one example):
<li wicket:id="contactLi"><a wicket:id="contactLink"
href="/contact">Contact Information</a></li>
In the wicket ajax debug window, I am getting this:
INFO: focus removed from
INFO: focus set on startLinkc
INFO: Received ajax response (69 characters)
INFO:
<?xml version="1.0" encoding="UTF-8"?><ajax-response></ajax-response>
INFO: Response processed successfully.
INFO: refocus last focused component not needed/allowed
Implying that it ran, but did nothing? There are no validators in place
(yet) on the form.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/AjaxSubmitLink-not-working-tp4677120.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
**
This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
**
Re: AjaxSubmitLink not working
Posted by Entropy <bl...@gmail.com>.
Okay, I just did. Control does not get there either. BTW, if onError is
something we should always override, perhaps it should be abstract?
Still mystified....
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxSubmitLink-not-working-tp4677120p4677122.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: AjaxSubmitLink not working
Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Feb 15, 2017 at 6:51 PM, Entropy <bl...@gmail.com> wrote:
> I have a header links section in my header that must build in a dynamic
> way.
>
> AjaxSubmitLink link = new AjaxSubmitLink(linkName,
> formToSubmit) {
> @Override
> public void onSubmit(AjaxRequestTarget target,
> Form form) {
> //control never gets here.
> }
>
Always override #onError() too !
> };
>
> That is being built in a function call that is called from a loop (though I
> don't think that matters). The HTML (of one example):
>
> <li wicket:id="contactLi"><a wicket:id="contactLink"
> href="/contact">Contact Information</a></li>
>
> In the wicket ajax debug window, I am getting this:
>
> INFO: focus removed from
>
> INFO: focus set on startLinkc
>
> INFO: Received ajax response (69 characters)
>
> INFO:
> <?xml version="1.0" encoding="UTF-8"?><ajax-response></ajax-response>
>
> INFO: Response processed successfully.
>
> INFO: refocus last focused component not needed/allowed
>
> Implying that it ran, but did nothing? There are no validators in place
> (yet) on the form.
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/AjaxSubmitLink-not-working-tp4677120.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
>
>