or try this: public class MyButton extends Composite { interface MyButtonUiBinder extends MyButtonUiBinder<PushButton, MyButton> {} public static MyButton UiBinder uiBinder = GWT.create(MyButtonUiBinder.class);
private final PushButton button; public SelectedButton() { initWidget(uiBinder.createAndBindUi(this)); } On 28 Apr., 18:38, Ulon <monz...@gmail.com> wrote: > HI! > I have a problem understanding how UIBinder really works. Let me show > you the example I'm trying to run: > > ---------------- > public class MyButton extends Composite { > interface MyButton UiBinder extends UiBinder<PushButton, MyButton> > {} > public static MyButton UiBinder uiBinder = > GWT.create(MyButton .class); > > @UiField > DivElement content; > > public SelectedButton() { > initWidget(uiBinder.createAndBindUi(this)); > } > ------------------ > > And my XML is like following: > > ---------------- > ... > <g:PushButton> > <g:upFace> > <div class="{style.nicestyling}"></div> > <div class="{style.morenicestyling}"></div> > <div ui:field="content"></div> > </g:upFace> > </g:PushButton> > .... > (i've omited part of the XML that isn't necessary) > ---------------- > > Now, If I try to compile that I get some specially unhelpful > exception: java.util.NoSuchElementException: null > > Apparently, it's because I have a "ui:field" inside the > <g:PushButton>. In case that is not allowed, how can I design a button > using UIBinder and make the button name dynamic? > > Thanks people :-) > > -- > 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 > athttp://groups.google.com/group/google-web-toolkit?hl=en. -- 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.