public PhotoDetailsActivity(PhotoDetailsPlace place, ClientFactory clientFactory) { this.clientFactory = clientFactory; this.id = place.getPhotoId(); // Get and link up the necessary aspects this.appEventBus = clientFactory.getEventBus(); this.rpcService = clientFactory.getPhotoServices(); }
public void start( final AcceptsOneWidget panel, final com.google.gwt.event.shared.EventBus eventBus) { this.photoDetailsView = clientFactory.getPhotoView(); bind(); appEventBus.fireEvent(new AppBusyEvent()); currHttpRequest = rpcService.getPhotoDetails( id, new AsyncCallback<PhotoDetails>() { public void onSuccess(PhotoDetails result) { photoDetails = result; photoDetailsView.getPhotoTitle().setValue(photoDetails.getTitle()); photoDetailsView.getPhotoTags().setValue(photoDetails.getTags()); photoDetailsView.setPhoto(photoDetails.getLargeUrl()); appEventBus.fireEvent(new AppFreeEvent()); panel.setWidget(photoDetailsView.asWidget()); madeEdits = false; initialised = true; } public void onFailure(Throwable caught) { appEventBus.fireEvent(new AppFreeEvent()); } }); }