Last active
June 14, 2018 15:28
-
-
Save lofidewanto/f71883c529356792b2fe15a39c217579 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
... | |
Button button = new Button(); | |
button.setType(..); | |
... | |
Element th1 = DOM.createTH(); | |
th1.appendChild(button.getElement()); | |
// NOT WORKING: add click event to Button | |
button.addClickHandler(event -> { | |
logger.info("OnBrowserEvent: OK"); | |
}); | |
// NOT WORKING: add click event to Button | |
Element buttonElement = button.getElement(); | |
Event.sinkEvents(buttonElement, Event.ONCLICK); | |
Event.setEventListener(buttonElement, event -> { | |
logger.info("OnBrowserEvent: OK"); | |
if (Event.ONCLICK == event.getTypeInt()) { | |
logger.info("OnBrowserEvent: OK"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment