@Override protected void onReset() { super.onReset(); getView().setMessage("Loading..."); getView().setBackLinkHistoryToken(placeManager.buildRelativeHistoryToken(-1)); dispatcher.execute( new GetProductAction(id), new AsyncCallback<GetProductResult>() { @Override public void onFailure(Throwable caught) { getView().setMessage("Unknown product"); } @Override public void onSuccess(GetProductResult result) { getView().setProductDetails(result.getProduct()); } }); }
private void setHistoryTokens() { getView() .setTaxonomiesHistoryToken( placeManager.buildRelativeHistoryToken( new PlaceRequest.Builder().nameToken(Places.TAXONOMIES).build(), 1)); }