In gwt 2.0 installation folder you have example of Mail application. Maybe this example will help understand idea of UIBinder. But If you find new examples, let me know :)
On 22 янв, 10:01, "chrisgo...@gmail.com" <chrisgo...@gmail.com> wrote: > 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 google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.