Example usage for com.google.gwt.gwtpages.client.applicationpresenter CompositeLayoutApplicationPresenter PRESENTER_TOKEN_KEY

List of usage examples for com.google.gwt.gwtpages.client.applicationpresenter CompositeLayoutApplicationPresenter PRESENTER_TOKEN_KEY

Introduction

In this page you can find the example usage for com.google.gwt.gwtpages.client.applicationpresenter CompositeLayoutApplicationPresenter PRESENTER_TOKEN_KEY.

Prototype

Object PRESENTER_TOKEN_KEY

To view the source code for com.google.gwt.gwtpages.client.applicationpresenter CompositeLayoutApplicationPresenter PRESENTER_TOKEN_KEY.

Click Source Link

Usage

From source file:com.google.gwt.gwtpages.demo.client.loaders.DemoPageLoader.java

/**
 * We'll add some data to the page attributes
 * /*from   w w  w  .j  av  a2s .  c o m*/
 * @param token
 *            the page token
 * @param title
 *            the page title (this is referenced in the application
 *            presenters - {@link DefaultLayoutPage} and
 *            {@link RightNavLayoutPage}
 * @param layoutToken
 *            the token representing which application presenter (layout) we
 *            will use - {@link CompositeLayoutApplicationPresenter}
 * @param pageClass
 *            the page class
 */
private void registerPage(String token, String title, String layoutToken, Class<? extends Page> pageClass) {
    PageAttributes attributes = new PageAttributes();
    attributes.put(PageConstants.PARAM_PAGE_TITLE, title);
    if (null != layoutToken)
        attributes.put(CompositeLayoutApplicationPresenter.PRESENTER_TOKEN_KEY, layoutToken);
    super.registerPage(token, pageClass, attributes);
}

From source file:com.google.gwt.gwtpages.demo.client.loaders.DemoPageLoader.java

private void registerPage(String token, String title, String layoutToken, Class<? extends Page> pageClass,
        Class<?> viewClass) {
    PageAttributes attributes = new PageAttributes();
    attributes.put(PageConstants.PARAM_PAGE_TITLE, title);
    if (null != layoutToken)
        attributes.put(CompositeLayoutApplicationPresenter.PRESENTER_TOKEN_KEY, layoutToken);
    super.registerPage(token, pageClass, viewClass, attributes);
}

From source file:com.google.gwt.gwtpages.demo.client.pages.LayoutsPage.java

/**
 * The application presenters are defined in the composite application presenter {@link GWT_Pages_Demo} 
 *//*from  w  ww. j a  v  a2 s.co  m*/
private void showStandardLayout() {
    GotoPageCommand cmd = pages.gotoPage(PageConstants.PAGE_LAYOUTS);
    cmd.getSession().put(CompositeLayoutApplicationPresenter.PRESENTER_TOKEN_KEY, PageConstants.LAYOUT_DEFAULT);
    cmd.execute();
}