List of usage examples for com.google.gwt.gdata.client.gbase AttributesFeedCallback AttributesFeedCallback
AttributesFeedCallback
From source file:com.google.gwt.gdata.sample.hellogdata.client.GoogleBaseRetrieveItemTypeAttributesDemo.java
License:Apache License
/** * Retrieve the attributes feed for the product type using the * Google Base service and the attributes feed uri. * In GData all get, insert, update and delete methods always * receive a callback defining success and failure handlers. * Here, the failure handler displays an error message while the * success handler calls showData to display the attribute entries. * //from ww w . j av a 2s . co m * @param attributesFeedUri The uri of the items feed */ private void getAttributes(String attributesFeedUri) { showStatus("Loading attributes feed...", false); service.getAttributesFeed(attributesFeedUri, new AttributesFeedCallback() { public void onFailure(CallErrorException caught) { showStatus("An error occurred while retrieving the attributes feed: " + caught.getMessage(), true); } public void onSuccess(AttributesFeed result) { AttributesEntry[] entries = result.getEntries(); if (entries.length == 0) { showStatus("No attributes found.", false); } else { showData(entries); } } }); }