Example usage for com.google.gwt.gwtpages.client.page.parameters PageParameters getParameters

List of usage examples for com.google.gwt.gwtpages.client.page.parameters PageParameters getParameters

Introduction

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

Prototype

public Serializable[] getParameters();

Source Link

Document

Return the ordinal parameters

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/* w ww .j a  v a2  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");
}

From source file:hudson.gwtmarketplace.client.pages.product.EditProductPage.java

License:Open Source License

@Override
public void onEnterPage(PageParameters parameters, PageRequestSession session,
        final AsyncPageCallback callback) {
    callback.waitForAsync();//w  w w . j  a v a  2  s  . c  o m
    if (parameters.getParameters().length > 0) {
        productService.getForEditing(parameters.asString(0), new AsyncCallback<Pair<Product, String>>() {

            @Override
            public void onSuccess(Pair<Product, String> result) {
                show(result);
                callback.onSuccess();
            }

            @Override
            public void onFailure(Throwable caught) {
                Messages.get().error(caught.getMessage(), null);
            }
        });
    }
}