You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Abid K <ab...@gmail.com> on 2010/10/07 16:55:09 UTC

Monitor external link clicks

Hi,

I am using the ExternalLink class for external sites. I've noticed
this class does not implement the ILinkListener interface and I am not
able to monitor these clicks.

I tried to implement the listener, but I did not get far. e.g.
public class MonitorExternalLink extends ExternalLink implements ILinkListener {
...
}

Does anyone know how I can implement a listener on the ExternalLink class?

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Monitor external link clicks

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
I mean:

link.add(new AjaxEventBehavior("onclick") {
  ...
});


**
Martin

2010/10/7 Abid K <ab...@gmail.com>:
> Hi Martin,
>
> Do you mean the javascript 'onclick' function? Cause I have tried to
> implement the "onLinkClicked( )" method, and copied the 'getUrl()',
> 'onComponentTag()' methods from the Link class. But, did not manage to
> get it working.
>
> Thanks
>
>
>
>
> On 7 October 2010 16:00, Martin Makundi
> <ma...@koodaripalvelut.com> wrote:
>> Add onclickbehavior?
>>
>> **
>> Martin
>>
>> 2010/10/7 Abid K <ab...@gmail.com>:
>>> Hi,
>>>
>>> I am using the ExternalLink class for external sites. I've noticed
>>> this class does not implement the ILinkListener interface and I am not
>>> able to monitor these clicks.
>>>
>>> I tried to implement the listener, but I did not get far. e.g.
>>> public class MonitorExternalLink extends ExternalLink implements ILinkListener {
>>> ...
>>> }
>>>
>>> Does anyone know how I can implement a listener on the ExternalLink class?
>>>
>>> Thanks
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Monitor external link clicks

Posted by Abid K <ab...@gmail.com>.
Hi Martin,

Do you mean the javascript 'onclick' function? Cause I have tried to
implement the "onLinkClicked( )" method, and copied the 'getUrl()',
'onComponentTag()' methods from the Link class. But, did not manage to
get it working.

Thanks




On 7 October 2010 16:00, Martin Makundi
<ma...@koodaripalvelut.com> wrote:
> Add onclickbehavior?
>
> **
> Martin
>
> 2010/10/7 Abid K <ab...@gmail.com>:
>> Hi,
>>
>> I am using the ExternalLink class for external sites. I've noticed
>> this class does not implement the ILinkListener interface and I am not
>> able to monitor these clicks.
>>
>> I tried to implement the listener, but I did not get far. e.g.
>> public class MonitorExternalLink extends ExternalLink implements ILinkListener {
>> ...
>> }
>>
>> Does anyone know how I can implement a listener on the ExternalLink class?
>>
>> Thanks
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Monitor external link clicks

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Add onclickbehavior?

**
Martin

2010/10/7 Abid K <ab...@gmail.com>:
> Hi,
>
> I am using the ExternalLink class for external sites. I've noticed
> this class does not implement the ILinkListener interface and I am not
> able to monitor these clicks.
>
> I tried to implement the listener, but I did not get far. e.g.
> public class MonitorExternalLink extends ExternalLink implements ILinkListener {
> ...
> }
>
> Does anyone know how I can implement a listener on the ExternalLink class?
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Monitor external link clicks

Posted by Abid K <ab...@gmail.com>.
Thanks, that has worked.

On 7 October 2010 16:34, Martijn Dashorst <ma...@gmail.com> wrote:
> That is the whole point of externallink: it links to an external URL.
> If you want to receive the request prior to sending the user onwards,
> use a proper Link and redirect the browser to the external url using
> setRequestTarget(new RedirectRequestTarget(url));
>
> Martijn
>
> On Thu, Oct 7, 2010 at 4:55 PM, Abid K <ab...@gmail.com> wrote:
>> Hi,
>>
>> I am using the ExternalLink class for external sites. I've noticed
>> this class does not implement the ILinkListener interface and I am not
>> able to monitor these clicks.
>>
>> I tried to implement the listener, but I did not get far. e.g.
>> public class MonitorExternalLink extends ExternalLink implements ILinkListener {
>> ...
>> }
>>
>> Does anyone know how I can implement a listener on the ExternalLink class?
>>
>> Thanks
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.4 increases type safety for web applications
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Monitor external link clicks

Posted by Martijn Dashorst <ma...@gmail.com>.
That is the whole point of externallink: it links to an external URL.
If you want to receive the request prior to sending the user onwards,
use a proper Link and redirect the browser to the external url using
setRequestTarget(new RedirectRequestTarget(url));

Martijn

On Thu, Oct 7, 2010 at 4:55 PM, Abid K <ab...@gmail.com> wrote:
> Hi,
>
> I am using the ExternalLink class for external sites. I've noticed
> this class does not implement the ILinkListener interface and I am not
> able to monitor these clicks.
>
> I tried to implement the listener, but I did not get far. e.g.
> public class MonitorExternalLink extends ExternalLink implements ILinkListener {
> ...
> }
>
> Does anyone know how I can implement a listener on the ExternalLink class?
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org