public void create(EmployeeProxy reporter) { request = requestFactory.reportRequest(); report = request.create(ReportProxy.class); request.persist().using(report); report.setReporter(reporter); displayReport(); }
@SuppressWarnings("deprecation") public void onCustom() { ReportProxy editableReport = request.edit(report); editableReport.setPurpose(purposeText.getText()); editableReport.setNotes(notesText.getText()); editableReport.setDepartment(departmentList.getValue(departmentList.getSelectedIndex())); // TODO(jgw): Use non-deprecated date methods for this. Date date = new Date( dateYear.getSelectedIndex() + 100, dateMonth.getSelectedIndex(), dateDay.getSelectedIndex() + 1); editableReport.setCreated(date); // TODO: wait throbber request.fire( new Receiver<Void>() { @Override public void onSuccess(Void ignore) {} // use onViolations to check for ConstraintViolations. }); }