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 <[email protected]> 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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.