Search code examples
javagwtuibinder

GWT wrap <th/> element as Widget and adding click event


I need adding a click event to th (in a table with UIBinder context). Is it possible? Have I to create a TH-Widget with a wrap method? If it's so, how?

Thanks, Randomize


Solution

  • You can create your own widget the old-fashioned way with

    class TableHead extends Widget implements HasClickHandlers
    

    and then override onBrowserEvent and implement addClickHandler using other GWT widgets as a model. But I don't know how that interacts with UIBinder.