List of usage examples for com.google.gwt.gdata.client.calendar CalendarEntry updateEntry
public final native void updateEntry(Callback<E> callback) ;
From source file:com.google.gwt.gdata.sample.hellogdata.client.CalendarUpdateCalendarDemo.java
License:Apache License
/** * Update a calendar by making use of the updateEntry * method of the Entry class./*from w w w . ja v a 2 s .co m*/ * Set the calendar's title to an arbitrary string. Here * we prefix the title with 'GWT-Calendar-Client' so that * we can identify which calendars were updated by this demo. * On success and failure, display a status message. * * @param targetCalendar The calendar entry which to update */ private void updateCalendar(CalendarEntry targetCalendar) { targetCalendar.setTitle(Text.newInstance()); targetCalendar.getTitle().setText("GWT-Calendar-Client - updated calendar"); showStatus("Updating calendar...", false); targetCalendar.updateEntry(new CalendarEntryCallback() { public void onFailure(CallErrorException caught) { showStatus("An error occurred while updating a calendar: " + caught.getMessage(), true); } public void onSuccess(CalendarEntry result) { showStatus("Updated a calendar.", false); } }); }