yahooAttribution.setContents("<a href='http://developer.yahoo.net/about'>"
+ "<img src='http://l.yimg.com/a/i/us/nt/bdg/websrv_88_1.gif' border='0'>"
+ "</a>");
canvas.addChild(yahooAttribution);
XJSONDataSource yahooDS = new XJSONDataSource();
yahooDS.setDataURL("http://api.search.yahoo.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&output=json");
yahooDS.setRecordXPath("/ResultSet/Result");
DataSourceImageField thumbnail = new DataSourceImageField("Thumbnail", "Thumbnail");
thumbnail.setWidth(150);
thumbnail.setImageHeight("imageHeight");
thumbnail.setImageWidth("imageWidth");
thumbnail.setValueXPath("Thumbnail/Url");
DataSourceIntegerField imageWidth = new DataSourceIntegerField("imageWidth");
imageWidth.setValueXPath("Thumbnail/Width");
imageWidth.setAttribute("hidden", true);
DataSourceIntegerField imageHeight = new DataSourceIntegerField("imageHeight");
imageHeight.setValueXPath("Thumbnail/Height");
imageHeight.setAttribute("hidden", true);
DataSourceField title = new DataSourceField("Title", FieldType.TEXT);
DataSourceField summary = new DataSourceField("Summary", FieldType.TEXT);
DataSourceLinkField fullImage = new DataSourceLinkField("link", "Full Image");
fullImage.setValueXPath("Url");
fullImage.setAttribute("target", "_blank");
yahooDS.addField(thumbnail);
yahooDS.addField(imageWidth);
yahooDS.addField(imageHeight);
yahooDS.addField(title);
yahooDS.addField(summary);
yahooDS.addField(fullImage);
final TileGrid tileGrid = new TileGrid();
tileGrid.setTop(120);
tileGrid.setWidth(500);
tileGrid.setHeight(400);