Tuesday, April 5, 2011

Re: UiBinder issue with non-static inner class

I was able to get it to work by defining the InnerClass element, in
MyClass.ui.xml, as its Parent class, for example Composite, and using
@UiField(provided=true).

<g:Composite ui:field="innerClass" />

@UiField(provided=true) InnerClass innerClass = new InnerClass();

Thanks Thomas,
Pat

On Apr 5, 4:43 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> UiBinder is no magic, it generates code that you could have written by hand,
> so an HTMLPanel would work the same in Java.
>
> But before you refactor your code, have you tried @UiField(provided=true) or
> a @UiFactory method? Maybe you would have to put a static class/interface
> name in the *.ui.xml though to make it work (whereas the concrete
> implementation is you non-static inner class).

--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate