You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Yazeed Isaacs <Ya...@transactionjunction.co.za> on 2008/10/22 16:58:53 UTC

Double clickable rows in AjaxFallbackDefaultDataTable

Hi

Does anyone know how to implement something that could do this.

Please point me in the right direction.

Regards,
Yazeed Isaacs


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


Re: Double clickable rows in AjaxFallbackDefaultDataTable

Posted by Igor Vaynberg <ig...@gmail.com>.
add a behavior to the row item that listens to ondblclick or whatever
the event is called. i am not sure that TRs support this, so check in
the browser first.

to add the behavior to the row item override newrowitem on the table.

-igor

On Wed, Oct 22, 2008 at 7:58 AM, Yazeed Isaacs
<Ya...@transactionjunction.co.za> wrote:
> Hi
>
> Does anyone know how to implement something that could do this.
>
> Please point me in the right direction.
>
> Regards,
> Yazeed Isaacs
>
>
> ---------------------------------------------------------------------
> 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: Double clickable rows in AjaxFallbackDefaultDataTable

Posted by Yazeed Isaacs <Ya...@transactionjunction.co.za>.
Hi Igor

Thanks for the tip. It work perfectly.

I overrode the newRowItem() method of AjaxFallbackDefaultDataTable like
this:

protected Item newRowItem(String id, int index, IModel model) {
		Item rowItem = super.newRowItem(id, index, model);
		AjaxEventBehavior onDoubleClickBehaviour = new
AjaxEventBehavior(
				"ondblclick") {

			@Override
			protected void onEvent(AjaxRequestTarget target)
{
				// the code that will execute once a
double click occurs
	
target.appendJavascript("alert('ondblclick occurred');");
			}

		};
		rowItem.add(onDoubleClickBehaviour);

		return rowItem;
}


Regards,
Yazeed Isaacs



-----Original Message-----
From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com] 
Sent: 22 October 2008 05:46 PM
To: users@wicket.apache.org
Subject: Re: Double clickable rows in AjaxFallbackDefaultDataTable

add a behavior to the row item that listens to ondblclick or whatever
the event is called. i am not sure that TRs support this, so check in
the browser first.

to add the behavior to the row item override newrowitem on the table.

-igor

On Wed, Oct 22, 2008 at 7:58 AM, Yazeed Isaacs
<Ya...@transactionjunction.co.za> wrote:
> Hi
>
> Does anyone know how to implement something that could do this.
>
> Please point me in the right direction.
>
> Regards,
> Yazeed Isaacs
>
>
> ---------------------------------------------------------------------
> 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