@SuppressWarnings("deprecation") @Override public void start(AcceptsOneWidget panel, EventBus eventBus) { Log.info("ClinicDetailsActivity.start()"); ClinicDetailsView ClinicDetailsView = new ClinicDetailsViewImpl(); ClinicDetailsView.setPresenter(this); this.widget = panel; this.view = ClinicDetailsView; widget.setWidget(ClinicDetailsView.asWidget()); view.setDelegate(this); loadDisplaySettings(); requests .find(place.getProxyId()) .fire( new Receiver<Object>() { public void onFailure(ServerFailure error) { Log.error(error.getMessage()); } @Override public void onSuccess(Object response) { if (response instanceof ClinicProxy) { Log.info(((ClinicProxy) response).getName()); init((ClinicProxy) response); } } }); }
private void loadDisplaySettings() { int detailsTab = 0; if (userSettings.hasSettings()) { Log.info("Loading Display"); detailsTab = userSettings.getIntValue("detailsTab"); } view.setSelectedDetailsTab(detailsTab); }
public void storeDisplaySettings() { userSettings.setValue("detailsTab", view.getSelectedDetailsTab()); userSettings.flush(); }
@SuppressWarnings("deprecation") private void init(ClinicProxy ClinicProxy) { Log.info("response size "); this.clinicProxy = ClinicProxy; Log.info("Clinic ID ::: " + clinicProxy.getId()); requests .clinicRequestNonRoo() .findAllDoctorsId(clinicProxy.getId()) .with("doctars", "doctors.specialisation") .fire( new OSCEReceiver<List<ClinicProxy>>() { @Override public void onSuccess(List<ClinicProxy> response) { Log.info("inside Success "); stackIndex = 0; if (response != null && response.size() > 0) { clinicProxyList = response; Iterator<ClinicProxy> clinicList = response.iterator(); clinicProxy = response.get(0); while (clinicList.hasNext()) { Log.info("into next value"); ClinicProxy clinicProxy = clinicList.next(); Log.info("Size of Doctors " + clinicProxy.getDoctors().size()); List<DoctorProxy> l = new ArrayList<DoctorProxy>(clinicProxy.getDoctors()); final ClinicSubView clinicSubView = new ClinicSubViewImpl(); clinicSubView.setDelegate(clinicDetailsActivity); String clinicLable = ""; if (l.get(0) != null && l.get(0).getSpecialisation() != null) { Log.info("Data is available"); clinicLable = l.get(0).getSpecialisation().getName(); } // view.setValue(ClinicProxy); // view.getSpecialTabPanel().insert(clinicSubView, stackIndex); view.getSpecialTabPanel().add((Widget) clinicSubView, clinicLable, true); Log.info("clinicID::::" + clinicProxy.getId()); requests .clinicRequest() .findClinic(clinicProxy.getId()) .with( "doctors", "doctors.specialisation", "doctors.specialisation.oscePostBlueprint", "doctors.specialisation.oscePostBlueprint.osce") .fire( new OSCEReceiver<ClinicProxy>() { @Override public void onSuccess( ch.unibas.medizin.osce.client.managed.request.ClinicProxy response) { Log.info("response" + response.getDoctors().size()); List<DoctorProxy> doctors = new ArrayList<DoctorProxy>(); doctors.addAll(response.getDoctors()); clinicSubView.getTable().setRowData(doctors); Log.info("Array count" + arrarycount); } }); stackIndex++; Log.info("Stack value:::::" + stackIndex); } } } }); view.setValue(clinicProxy); view.setDelegate(this); }