Search code examples
gwtgwt-platformgwtp

Render main presenter view in a specific div


For a GWTP based MVP a typical main presenter will be revealed with this code:

@Override
protected void revealInParent() {
    RevealRootContentEvent.fire(this, this);
}

This will render the View associated with the "main presenter" in the whole browser page. Is there any way for a main presenter's view to be rendered in a specific DIV in the page only. And not the whole page?

For example:

<div id="main-presenter"></div>

Solution

  • Look at nested presenters

    @Override
    protected void revealInParent() {
        RevealContentEvent.fire(this, MainPagePresenter.TYPE_SetMainContent,
                this);
    }