}
}
private Duty subviewToForm(DutyForm dutyForm) {
Duty var = new Duty();
if (dutyForm != null) {
try {
BeanUtils.copyProperties(var, dutyForm);
} catch (Exception iae) {
iae.printStackTrace();
}
}
var.setOperateBy(operateBy);
var.setUser(user);
Listbox authListbox = (Listbox) getFellow("auth");
var.setAuth((Auth) (authListbox.getSelectedItem()).getValue());
Datebox validAfterDate = (Datebox) getFellow("validAfterDate");
Timebox validAfterTime = (Timebox) getFellow("validAfterTime");
if (validAfterDate.getValue() != null
&& validAfterTime.getValue() != null) {
Timestamp validAfter = new Timestamp(validAfterDate.getValue().getTime());
validAfter.setHours(validAfterTime.getValue().getHours());
validAfter.setMinutes(validAfterTime.getValue().getMinutes());
var.setValidAfter(validAfter);
}
Datebox validBeforeDate = (Datebox) getFellow("validBeforeDate");
Timebox validBeforeTime = (Timebox) getFellow("validBeforeTime");
if (validBeforeDate.getValue() != null
&& validBeforeTime.getValue() != null) {
Timestamp validBefore = new Timestamp(validBeforeDate.getValue().getTime());
validBefore.setHours(validBeforeTime.getValue().getHours());
validBefore.setMinutes(validBeforeTime.getValue().getMinutes());
var.setValidBefore(validBefore);
}
return var;
}