Sunday, March 14, 2010

Sample 5 Problems [Update] - Fixed!

Original problem highlighted here.
Thanks to Hendrik Thieß (@Turayen) for helping us solve this one.
@gwtsushi myField is not initialized.Remove "Hidden" in the constructor of MyPanel.Hint: if u use provided=true set the attribut as final :)
Which led us to changing MyPanel.Java from:
@UiField(provided=true)
Hidden myField;

public MyPanel(String someText) {
Hidden myField = new Hidden();
myField.setValue(someText);
initWidget(uiBinder.createAndBindUi(this));
}

to

@UiField(provided=true) final Hidden myField = new Hidden();

public MyPanel(String someText) {
//Hidden myField = new Hidden();
this.myField.setValue(someText);
initWidget(uiBinder.createAndBindUi(this));
}

I have just one word to say – AWESOME and thanks!

No comments:

Post a Comment