quick question on GWT from a newbie. Considering the following code:
FlowPanel block = buildMyBlock(); // buildMyBlock builds a FlowPanel with different widgets in it
block.addDomHandler(
new ClickHandler()
{
@Override
public void onClick(ClickEvent event)
{
// do some stuff
}
},
ClickEvent.getType());
in the onClick() method, I’d like to be able to make different treatments depending on the internal elements that have been clicked inside block
Is it possible? And how ?
You can use
Element.as(event.getNativeEvent().getEventTarget())to retrieve the actual target of the event.