The other option is to keep provided=true and not use a @UiFactory;
just create it in the constructor:
@UiField(provided=true) Tree tree;
@UiField Images res;
public Mainlist() {
tree = new Tree(res);
initWidget(uiBinder.createAndBindUi(this));
}
I haven't tested the code above, but I'm pretty sure it would work. If
you only have one Tree, the two methods are pretty similar. If you had
multiple Trees that you wanted to construct the same way (or even with
different resources), @UiFactory might be a little more convenient.
-- Brian
> --
> 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-we...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-tool...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
-- Brian
On Wed, May 18, 2011 at 7:51 AM, Myth17 <nitish...@gmail.com> wrote:
> It seems to help but I still get an "Cannot parse attribute resources
> Element <g:Tree resources='res' ui:field='tree'> (:10)" error. :|
>