I'm really excited about this new feature in GWT (uibinding).  I've
already put together a small app that makes use of it and really see
its advantages.

So far, except for the tutorial listed here:
http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html

I've had to dig for examples in posts and such to learn my way
around.  For example, I had something like this:

ui:UiBinder
        xmlns:ui='urn:ui:com.google.gwt.uibinder'
        xmlns:g='urn:import:com.google.gwt.user.client.ui'
         ...
    <ui:style>
         ...
    </ui:style>
    <g:HTMLPanel styleName='{style.panel}'>
        <div class="{style.hitDiv}">
            Your refined query will return <span ui:field='numHits'
class='{style.largefont}' /> hit(s)
        </div>
        <g:Button ui:field='apply'>Apply Refinement</g:Button>
        <g:Button ui:field='cancel'>Cancel</g:Button>
    </g:HTMLPanel>
</ui:UiBinder>

And found out that I can't do something like this in my code... (makes
perfect sense why...)
  @UiHandler("apply")
    void handleClick(ClickEvent e) {
        Window.alert("Clicked Apply");
    }

    @UiHandler("cancel")
    void handleClick(ClickEvent e) {
        Window.alert("Clicked Cancel");
    }

I ended up finding an example elsewhere showing it had to be done like
this:

 @UiHandler("apply")
    void onApplyHandleClick(ClickEvent e) {
        Window.alert("Clicked Apply");
    }

    @UiHandler("cancel")
    void onCancelHandleClick(ClickEvent e) {
        Window.alert("Clicked Cancel");
    }


Where is this documented? :)  If someone has some useful links to this
stuff, I'd really appreciate it.

Thanks,
Chris

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to