Example usage for com.google.gwt.gwtpages.client.page PageAttributes PageAttributes

List of usage examples for com.google.gwt.gwtpages.client.page PageAttributes PageAttributes

Introduction

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

Prototype

PageAttributes

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.  jav a 2  s .  co  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);
}