Example usage for com.google.gwt.gwtpages.client PageRequestSession put

List of usage examples for com.google.gwt.gwtpages.client PageRequestSession put

Introduction

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

Prototype

public <R> PageAttributes put(Class<R> context, R data) 

Source Link

Document

Add a data attribute

Usage

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

private void onTransientDataNavigation() {
    PageRequestSession session = new PageRequestSession();
    session.put("foo", "this will not appear in the history token");
    pages.goTo(PageConstants.PAGE_REQUEST_INFO, session)
            .addParameter("param1", "you can still add history parameters").execute();
}

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

private void onCommandPassing() {
    PageRequestSession session = new PageRequestSession();
    session.put(PageConstants.PARAM_BACK_TITLE, "Navigation").put(PageConstants.PARAM_BACK_COMMAND,
            pages.getLastCommand());//  www .j  a  va2 s  .com
    pages.goTo(PageConstants.PAGE_REQUEST_INFO, session).addParameter("param1", 12345).execute();
}