List of usage examples for com.google.gwt.gdata.client EventEntryCallback EventEntryCallback
EventEntryCallback
From source file:com.google.gwt.gdata.sample.hellogdata.client.CalendarUpdateEventDemo.java
License:Apache License
/** * Update an event by making use of the updateEntry * method of the Entry class./* ww w . j a va2 s . com*/ * Set the event's title to an arbitrary string. Here * we prefix the title with 'GWT-Calendar-Client' so that * we can identify which events were updated by this demo. * On success and failure, display a status message. * * @param targetEvent The event entry which to update */ private void updateEvent(CalendarEventEntry targetEvent) { targetEvent.setTitle(Text.newInstance()); targetEvent.getTitle().setText("GWT-Calendar-Client - updated event"); showStatus("Updating a Calendar event...", false); targetEvent.updateEntry(new EventEntryCallback() { public void onFailure(CallErrorException caught) { showStatus("An error occurred while updating a Calendar event: " + caught.getMessage(), true); } public void onSuccess(EventEntry result) { showStatus("Updated a Calendar event.", false); } }); }