Of course, there is a way to simulate a click on a HasClickHandlers object in GWT

When I use buttons, I can just call button.click () to simulate a click. Now I have a link to HasClickHandlers (maybe a button, maybe an image, etc.), but I can’t figure out how to click it!

Is it possible? I am using GWT 2.1

+4
source share
2 answers

You can use the following and fill in the fields as needed, such as the position of the screen, etc.

DomEvent.fireNativeEvent(Document.get().createClickEvent(0, 0, 0, 0, 0, false, false, false, false), button); 
+4
source

Can't you call fireEvent() from the HasHandlers superinterface?

Also, see post .

+1
source

Source: https://habr.com/ru/post/1334424/


All Articles