objTree.setTreeitemRenderer(objTreeRenderer);
}
public Object viewToObj(Object obj) {
Fun var = new Fun();
if (obj != null) {
try {
BeanUtils.copyProperties(var, obj);
} catch (Exception iae) {
iae.printStackTrace();
}
}
var.setOperateBy(operateBy);
Combobox ServiceCB = (Combobox) getFellow("service");
Textbox FunNameTB = (Textbox) getFellow("FunName");
Combobox BootFlag = (Combobox) getFellow("BootFlag");
Combobox ActiveFlag = (Combobox) getFellow("ActiveFlag");
Textbox FunPathTB = (Textbox) getFellow("FunPathTB");
Service service = (Service) ServiceCB.getSelectedItem().getValue();
var.setService(service);
var.setFunName(FunNameTB.getText());
var.setActiveFlag(ActiveFlag.getSelectedItem().getValue().toString());
var.setBootFlag(BootFlag.getSelectedItem().getValue().toString());
List operationsLists = ParaCache.getInstance().getByCatalogue("pri.Fun.operations");
StringBuffer sb = new StringBuffer();
Iterator it = operationsLists.iterator();
int firstCount = 0;
while (it.hasNext()) {
Para para = (Para) it.next();
Checkbox cb = (Checkbox) getFellow("checkbox_" + para.getParaName());
if (cb.isChecked()) {
if (firstCount != 0) {
sb.append(":");
}
sb.append(cb.getValue());
}
firstCount++;
}
var.setOperations(sb.toString());
var.setFunPath(FunPathTB.getText());
//internal parameters
var.setFunType("W");
var.setFunCode("FM-II");
return var;
}