}
public void objToView(Object obj) {
RegularMaintainForm form = (RegularMaintainForm)obj;
Combobox buildingCB = (Combobox) getFellow("building");
if(form.getBuildingId() != null) {
List items = buildingCB.getItems();
Iterator buildingItr = items.iterator();
while(buildingItr.hasNext()) {
Comboitem item = (Comboitem)buildingItr.next();
Building building = (Building)item.getValue();
if(building.getBuildingId().equals(form.getBuildingId())) {
buildingCB.setSelectedItem(item);
}
}
}
Combobox systemCB = (Combobox) getFellow("system");
List items = systemCB.getItems();
Iterator it = items.iterator();
while(it.hasNext()) {
Comboitem item = (Comboitem)it.next();
if(item.getValue().toString().equals(form.getSystemType())) {
systemCB.setSelectedItem(item);
}
}
selectMaintainEventTypeBySystem();
Combobox maintainEventTypeCB = (Combobox) getFellow("maintainEventType");
if(form.getEventTypeId() != null) {
List maintainEventTypeItems = maintainEventTypeCB.getItems();
Iterator maintainEventTypeItr = maintainEventTypeItems.iterator();
while(maintainEventTypeItr.hasNext()) {
Comboitem item = (Comboitem)maintainEventTypeItr.next();
MaintainEventType maintainEventType = (MaintainEventType)item.getValue();
if(maintainEventType.getEventTypeId().equals(form.getEventTypeId())) {
maintainEventTypeCB.setSelectedItem(item);
}
}
}
Textbox maintainEventNameTB = (Textbox) getFellow("maintainEventName");
maintainEventNameTB.setText(form.getMaintainEventName());
Textbox regularSettingTB = (Textbox) getFellow("regularSetting");
regularSettingTB.setText(form.getRegularSetting());
Textbox noteTB = (Textbox) getFellow("note");
noteTB.setText(form.getNote());
Combobox importantLevelCB = (Combobox) getFellow("importantLevel");
List importantLevelItems = importantLevelCB.getItems();
Iterator importantLevelItr = importantLevelItems.iterator();
while(importantLevelItr.hasNext()) {
Comboitem item = (Comboitem)importantLevelItr.next();
if(item.getValue().toString().equals(form.getImportantLevel())) {
importantLevelCB.setSelectedItem(item);
}
}
}