Reputation: 20890
When I use Buttons, I can just call button.click() to simulate a click. Now I have a reference to a HasClickHandlers (might be a button, might be an image, etc), but can't figure out how to click it!
Is it possible? I'm using GWT 2.1
Upvotes: 4
Views: 2049
Reputation: 2562
You can use the following and populate the fields as needed such as screen position and such.
DomEvent.fireNativeEvent(Document.get().createClickEvent(0, 0, 0, 0, 0, false, false, false, false), button);
Upvotes: 4