List of usage examples for com.google.gwt.gdata.client.finance TransactionFeedCallback TransactionFeedCallback
TransactionFeedCallback
From source file:com.google.gwt.gdata.sample.hellogdata.client.FinanceRetrieveTransactionsDemo.java
License:Apache License
/** * Retrieve the transactions feed for a given portfolio using the * Finance service and the transactions feed uri. * The failure handler displays an error message while the * success handler calls showData to display the transaction entries. * /*from www . j a va 2 s . c o m*/ * @param transactionFeedUri The transaction feed uri */ private void getTransactions(String transactionFeedUri) { showStatus("Loading transactions feed...", false); service.getTransactionFeed(transactionFeedUri, new TransactionFeedCallback() { public void onFailure(CallErrorException caught) { showStatus("An error occurred while retrieving the portfolios " + "feed: " + caught.getMessage(), true); } public void onSuccess(TransactionFeed result) { TransactionEntry[] entries = result.getEntries(); if (entries.length == 0) { showStatus("No transactions found.", false); } else { showData(entries); } } }); }