Monday, December 12, 2016

Re: How to make sure object is set before initWidget()

Have the parts that create the widget and populate the widgets separate.

A better approach would be, as recommended by GWT to use MVP design pattern.

1) You create your view/composite/widget (View.java)
2) You call your RPC in a presenter (Presenter.java)
3) Your presenter than transfer the object to the view
4) The view just renders the object values

The documentation here below explains this in detail:
http://www.gwtproject.org/doc/latest/DevGuideMvpActivitiesAndPlaces.html

--Harsh

--
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