I want a webapp skeleton similar to GWT “Showcase” example.
I mean: an entrypoint “docklayoutpanel”, with a ‘west’ area (the menu) and a ‘center’ (the app sections).
How can I make the anchors/buttons in the menu uibinder “open” the variuos webapp sections in the center zone?
Do I have to pass it a reference to the “ContentWrapper” (the ‘center’ uibinder)? Or is there a less coupling way? Thanks
Yes, there is. You can make use of GWT’s history support (documented at http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsHistory.html)
So you can either create a new history token on button click, or use the Hyperlink widget for your “buttons”.
Then you need to register a ValueChangeHandler using
History.addValueChangeHandler(), and you can switch the content of your center widget in that handler – nicely decoupled from your button code.