views:

105

answers:

1

Hello so I got a FixedWidthGrid table which is made from a pagingtable

FixedWidthGrid dataTable =  x.getDataTable();

I could add alot of handlers to the dataTables rows like selected or sort policies.

but I cant add a double click handler ... any idea's ?!

thank you

I do have a class which I made to try to add a double click handler but it didn't work.

class:

    public class DoubleClickTable extends FixedWidthGrid implements HasDoubleClickHandlers {
    public DoubleClickTable() {
        super();
    }

    public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
        return addDomHandler(handler, DoubleClickEvent.getType());
    }

}

Thank you so much for your help.

+1  A: 

Here is the way I'd implement a double click handler :

  • Create a time attribute to the class
  • In the ClickHandler method, fill a variable with the current time.
  • Compare the variable with the time attribute of the class (var - attr) and if the result is equal or smaller than one second, execute the method that handle double clicks.

This should do the trick. If you want more precision, don't hesitate to ask.

Zwik
I did exactly what you said , and then you posted it ..but my manager came a told me , forget about implementing it.the ticket is void , NO DOUBLE CLICKING IN WEBAPPS. !!
MArio
thank you so much tho for your time and effort
MArio
My pleasure! By the way, if you liked/agreed with my answer, you can give it a + (click on the upper arrow on the left) or if my answer was what you were looking for, you can accept it as the answer by clicking on the "check" mark. This is how stackoverflow work, welcome here!
Zwik