Thank you very much. That is a good idea. I found SimplePanel does not interact well with DeckLayoutPanel in term of sizing. I switch to LayoutPanel and it works better.
On Mar 16, 10:55 am, ome <max.okoro...@gmail.com> wrote: > Well, I did it like this. > > 1. In LayoutView.ui.xml I have a DockLayoutPanel : > > <g:center> > <g:SimplePanel ui:field="content" /> > </g:center> > > 2. In LayoutView: > > public class LayoutView extends Composite implements > LayoutPresenter.Display { > > @UiField SimplePanel content; > > @Override > public HasWidgets getContent() { > return content; > } > > } > > 3. in Presenter: > > public class LayoutPresenter { > > private Display display; > > public interface Display { > > HasWidgets getContent(); > } > > public void switchContent(Widget module) { > > display.getContent().clear(); > display.getContent().add(module); > } > > } > > On Mar 16, 6:59 am,zggame<zgg...@gmail.com> wrote: > > > > > Hi, I am new to gwt. I had a page with footer/header/content. The > > center content changes with different selection in the menu in > > header. I try to use the DockLayoutPanel. How can I change the view > > of the center content. It can only add once? Is that the correct > > widget to use? Thanks. -- 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.