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

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

Introduction

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

Prototype

@SuppressWarnings("unchecked")
public <R> R get(Class<R> context) 

Source Link

Document

Return the keyed data using the class as the token key

Usage

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

@Override
public void onEnterPage(PageParameters parameters, PageRequestSession session, AsyncPageCallback callback) {
    historyToken.setText(parameters.getHistoryToken());
    pageToken.setText(parameters.getPageToken());
    if (null != parameters.getParameters())
        ordinalParameters.setText(serialize(parameters.getParameters()));
    else// ww  w. j  av a  2 s .c  o m
        ordinalParameters.setText("N/A");
    if (null != parameters.getParameterMap())
        mappedParameters.setText(parameters.getParameterMap().toString());
    else
        mappedParameters.setText("N/A");
    transientParameters.setText(session.getData().toString());

    backCommand = (Command) session.get(PageConstants.PARAM_BACK_COMMAND);
    if (null != backCommand)
        gotoPage.setText("Back to " + session.get(PageConstants.PARAM_BACK_TITLE));
    else
        gotoPage.setText("Back to previous page");
}