public boolean validate() {
return true;
}
public Object viewToObj(Object obj) {
RegularMaintain var = new RegularMaintain();
if (obj != null) {
try {
BeanUtils.copyProperties(var, obj);
} catch (Exception iae) {
iae.printStackTrace();
}
}
Combobox buildingCB = (Combobox) getFellow("building");
if (buildingCB.getSelectedItem() != null) {
var.setBuilding((Building) buildingCB.getSelectedItem().getValue());
}
Combobox maintainEventTypeCB = (Combobox) getFellow("maintainEventType");
if (maintainEventTypeCB.getSelectedItem() != null) {
var.setEventType((MaintainEventType) maintainEventTypeCB.getSelectedItem().getValue());
}
Textbox maintainEventNameTB = (Textbox) getFellow("maintainEventName");
var.setMaintainEventName(maintainEventNameTB.getText());
Textbox regularSettingTB = (Textbox) getFellow("regularSetting");
var.setRegularSetting(regularSettingTB.getText());
Textbox noteTB = (Textbox) getFellow("note");
var.setNote(noteTB.getText());
Combobox importantLevelCB = (Combobox) getFellow("importantLevel");
if (importantLevelCB.getSelectedItem() != null) {
var.setImportantLevel(importantLevelCB.getSelectedItem().getValue().toString());
}
return var;
}