public void onStop() {
}
public void start(AcceptsOneWidget panel, EventBus eventBus) {
final ReportListPlace listPlace = place.getListPlace();
if (listPlace.getEmployeeId() == null) {
expensesRequestFactory.find(place.getReportId()).fire(
new Receiver<ReportProxy>() {
@Override
public void onSuccess(ReportProxy response) {
setReportRecord(response, listPlace.getDepartment(), null);
}
});
} else {
new EmployeeReportFetcher().Run(listPlace.getEmployeeId(),
place.getReportId(),
new Receiver<ExpenseReportDetails.EmployeeReportFetcher>() {
@Override
public void onSuccess(EmployeeReportFetcher response) {
setReportRecord(response.fetchedReport,
listPlace.getDepartment(), response.fetchedEmployee);
}
});
}
EntityProxyChange.registerForProxyType(eventBus, ExpenseProxy.class,