You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Richard W. Adams" <RW...@UP.COM> on 2012/02/19 00:27:59 UTC
AjaxLink.onClick() Not Triggered
I have an Ajax link in a drop down menu, created like this:
final MenuChoice item = new MenuChoice("Delete") {
private static final long serialVersionUID = 1L;
@Override protected AbstractLink newLink(final
String id) {
final AjaxLink<String> link = new
AjaxLink<String>(id) {
private static final long
serialVersionUID = 1L;
@Override public void
onClick(final AjaxRequestTarget
target) {
confirmer.confirm(model.getTrack(), target);
}
};
return link;
}
};
The generated HTML looks like this:
<a href="#" id="id28" onclick="var
wcall=wicketAjaxGet('?wicket:interface=:1:resultForm:track-list:gridViewportContainer:viewPortTable:dataGridBody:rows:2:cells:12:cell:smartMenu:menuItemRepeater:5:menuItem:labelContainer:menuLink:1:IBehaviorListener:0:',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('id28') != null;}.bind(this));return !wcall;">Delete</a>
However, when I click the link, the onClick() handler is not called. The
Wicket Ajax debug window shows no Ajax activity occurring.
Can anyone see what I'm doing wrong?
**
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: AjaxLink.onClick() Not Triggered
Posted by abidiensi <ay...@gmail.com>.
try to change jquery version, i have the same probleme with jquery 1.4.2 ,
AjaxLink not triggred but when i change jquery to 1.7.2 it works
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxLink-onClick-Not-Triggered-tp4400731p4650202.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: AjaxLink.onClick() Not Triggered
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
The produced <a ...> looks OK. Clicking on it should execute the
script in onclick.
Try with a different browser. Maybe JavaScript is disabled at the one
you use...
On Mon, Feb 20, 2012 at 11:12 PM, Richard W. Adams <RW...@up.com> wrote:
> Hmmmmm.. more mystery. I put a break point on wicketAjaxGet. But it never
> gets executed. Clicking the link, apparently does absolutely nothing.
> Doesn't even cause the Javascript to be called.
>
> Anyone have any ideas?
>
>
>
> From: Andrea Del Bene <an...@gmail.com>
> To: users@wicket.apache.org
> Date: 02/19/2012 07:26 AM
> Subject: Re: AjaxLink.onClick() Not Triggered
>
>
>
> Hi,
>
> at first glance I can't say what's wrong with your code, but you
> should try debugging wicketAjaxGet function with FireBug or some other
> dev tool. In this way you should find why there's no AJAX call.
>> I have an Ajax link in a drop down menu, created like this:
>>
>> final MenuChoice item = new MenuChoice("Delete") {
>> private static final long serialVersionUID =
> 1L;
>>
>> @Override protected AbstractLink newLink(final
>> String id) {
>> final AjaxLink<String> link = new
>> AjaxLink<String>(id) {
>> private static final long
>> serialVersionUID = 1L;
>> @Override public void
>> onClick(final AjaxRequestTarget
>> target) {
>> confirmer.confirm(model.getTrack(), target);
>> }
>> };
>> return link;
>> }
>> };
>>
>> The generated HTML looks like this:
>>
>> <a href="#" id="id28" onclick="var
>>
> wcall=wicketAjaxGet('?wicket:interface=:1:resultForm:track-list:gridViewportContainer:viewPortTable:dataGridBody:rows:2:cells:12:cell:smartMenu:menuItemRepeater:5:menuItem:labelContainer:menuLink:1:IBehaviorListener:0:',function()
>> { }.bind(this),function() { }.bind(this), function() {return
>> Wicket.$('id28') != null;}.bind(this));return !wcall;">Delete</a>
>>
>> However, when I click the link, the onClick() handler is not called. The
>> Wicket Ajax debug window shows no Ajax activity occurring.
>>
>> Can anyone see what I'm doing wrong?
>>
>> **
>>
>> 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.
>> **
>>
>
>
> ---------------------------------------------------------------------
> 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.
> **
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: AjaxLink.onClick() Not Triggered
Posted by "Richard W. Adams" <RW...@UP.COM>.
Hmmmmm.. more mystery. I put a break point on wicketAjaxGet. But it never
gets executed. Clicking the link, apparently does absolutely nothing.
Doesn't even cause the Javascript to be called.
Anyone have any ideas?
From: Andrea Del Bene <an...@gmail.com>
To: users@wicket.apache.org
Date: 02/19/2012 07:26 AM
Subject: Re: AjaxLink.onClick() Not Triggered
Hi,
at first glance I can't say what's wrong with your code, but you
should try debugging wicketAjaxGet function with FireBug or some other
dev tool. In this way you should find why there's no AJAX call.
> I have an Ajax link in a drop down menu, created like this:
>
> final MenuChoice item = new MenuChoice("Delete") {
> private static final long serialVersionUID =
1L;
>
> @Override protected AbstractLink newLink(final
> String id) {
> final AjaxLink<String> link = new
> AjaxLink<String>(id) {
> private static final long
> serialVersionUID = 1L;
> @Override public void
> onClick(final AjaxRequestTarget
> target) {
> confirmer.confirm(model.getTrack(), target);
> }
> };
> return link;
> }
> };
>
> The generated HTML looks like this:
>
> <a href="#" id="id28" onclick="var
>
wcall=wicketAjaxGet('?wicket:interface=:1:resultForm:track-list:gridViewportContainer:viewPortTable:dataGridBody:rows:2:cells:12:cell:smartMenu:menuItemRepeater:5:menuItem:labelContainer:menuLink:1:IBehaviorListener:0:',function()
> { }.bind(this),function() { }.bind(this), function() {return
> Wicket.$('id28') != null;}.bind(this));return !wcall;">Delete</a>
>
> However, when I click the link, the onClick() handler is not called. The
> Wicket Ajax debug window shows no Ajax activity occurring.
>
> Can anyone see what I'm doing wrong?
>
> **
>
> 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.
> **
>
---------------------------------------------------------------------
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: AjaxLink.onClick() Not Triggered
Posted by Andrea Del Bene <an...@gmail.com>.
Hi,
at first glance I can't say what's wrong with your code, but you
should try debugging wicketAjaxGet function with FireBug or some other
dev tool. In this way you should find why there's no AJAX call.
> I have an Ajax link in a drop down menu, created like this:
>
> final MenuChoice item = new MenuChoice("Delete") {
> private static final long serialVersionUID = 1L;
>
> @Override protected AbstractLink newLink(final
> String id) {
> final AjaxLink<String> link = new
> AjaxLink<String>(id) {
> private static final long
> serialVersionUID = 1L;
> @Override public void
> onClick(final AjaxRequestTarget
> target) {
> confirmer.confirm(model.getTrack(), target);
> }
> };
> return link;
> }
> };
>
> The generated HTML looks like this:
>
> <a href="#" id="id28" onclick="var
> wcall=wicketAjaxGet('?wicket:interface=:1:resultForm:track-list:gridViewportContainer:viewPortTable:dataGridBody:rows:2:cells:12:cell:smartMenu:menuItemRepeater:5:menuItem:labelContainer:menuLink:1:IBehaviorListener:0:',function()
> { }.bind(this),function() { }.bind(this), function() {return
> Wicket.$('id28') != null;}.bind(this));return !wcall;">Delete</a>
>
> However, when I click the link, the onClick() handler is not called. The
> Wicket Ajax debug window shows no Ajax activity occurring.
>
> Can anyone see what I'm doing wrong?
>
> **
>
> 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.
> **
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org