On Tuesday, August 27, 2013 5:01:07 PM UTC+2, Shaun Tarves wrote:
>
> Thomas, 
>
> Thanks for the heads up about the leak. How would I use "uibinder for 
> cells" if I am just creating a standard Composite-based widget?
>

Either you compose widgets, *or* you go low-level and then you can use 
"uibinder for cells" to work at the element-level.

What would an event delegation path look like at the composite level? 
> Do I just sink the events on this.getElement() and then check if the 
> event target is my UiField Element?
>

Basically, yes (you'd use addDomHandler or override onBrowserEvent though 
rather than "sink the events on this.getElement()")

With "uibinder for cells" (aka UiRenderer), you'd either build a Cell to 
use in CellWidget (have a look at TextButton for an example of such widget, 
even though it doesn't use UiRenderer) or extend Widget. In the latter 
case, you can render() your element into some root element (say, a <div>) 
using setInnerHTML, and delegate the widget's onBrowserEvent to the 
UiRenderer's onBrowserEvent, so it will do the dispatch to the appropriate 
@UiHandler method. And you can possibly get the inner elements to 
manipulate them directly.
See 
http://www.gwtproject.org/doc/latest/DevGuideUiBinder.html#Rendering_HTML_for_Cells

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to