public PlaceBookEntryPreview(final Entry entry) { initWidget(uiBinder.createAndBindUi(this)); container .getElement() .getStyle() .setBackgroundImage( "url(" + Resources.IMAGES.placebook_open().getSafeUri().asString() + ")"); title.setText(entry.getTitle()); description.setText(entry.getDescription()); author.setText(entry.getOwnerName()); if (entry.getPreviewImage() != null) { image.setUrl( PlaceBooks.getServer().getHostURL() + "media?hash=" + entry.getPreviewImage() + "&type=imageitem"); } else { image.setVisible(false); } container.addDomHandler( new ClickHandler() { @Override public void onClick(final ClickEvent event) { PlaceBooks.goTo(new PlaceBookPage(entry.getKey())); } }, ClickEvent.getType()); }
@Override public void load(String id) { PlaceBooks.getServer().getServerInfo(getCallback()); }