List of usage examples for com.google.gwt.gdata.client.finance TransactionEntry updateEntry
public final native void updateEntry(Callback<E> callback) ;
From source file:com.google.gwt.gdata.sample.hellogdata.client.FinanceUpdateTransactionDemo.java
License:Apache License
/** * Update a transaction by making use of the updateEntry * method of the Entry class.//from w ww .java2 s .c o m * Set the transaction notes to an arbitrary string. Here * we prefix the notes with 'GWT-Finance-Client' so that * we can identify which transactions were updated by this demo. * On success and failure, display a status message. * * @param transactionEntry The transaction entry which to update */ private void updateTransaction(TransactionEntry transactionEntry) { showStatus("Updating transaction...", false); transactionEntry.getTransactionData().setNotes("GWT-Finance-Client - updated transaction"); transactionEntry.getTransactionData().setShares(271.82); transactionEntry.updateEntry(new TransactionEntryCallback() { public void onFailure(CallErrorException caught) { showStatus("An error occurred while updating a transaction: " + caught.getMessage(), true); } public void onSuccess(TransactionEntry result) { showStatus("Updated a transaction.", false); } }); }