Tuesday, February 9, 2016

Re: TextBox fails to show updated text


I have tried stepping through the code in debug mode and found that the code indeed updates the TextBox.  But the new value just doesn't show up in the UI.

I am pretty sure the above code works as expected when creating a demo project. So I guess you have a bug in your code that you have not shown here.

The most simple bug that can cause this issue is assigning a new instance of TextBox to the @UiField annotated field messageTextBox after initWidget() has been called. The new instance is not attached to the DOM and thus you won't see the updated text. 

-- J.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment