/**
* 在编辑页面中,保存按钮点击时触发
*/
@Override
public void actionSave_actionPerformed(ActionEvent e) throws Exception {
super.actionSave_actionPerformed(e);
Hashtable hs = new Hashtable();
KDTable kt = null;
findComponent(this.contBizDate.getParent(),
new String[] { "kdtEntrys" }, hs);
if (hs.size() > 0) {
Object oo = hs.get("kdtEntrys");
if (oo != null) {
kt = (KDTable) oo;
}
}
kt.getCell(0, 0).getValue();
}
/**
* Administrator 2015-11-16 下午03:54:52
*
* @param parent
* @param strings
* @param hs
*/
private void findComponent(Component comp, String[] controls,
Hashtable<String, Component> found) {
Container con = null;
boolean nameEquals = false;
String CompName = null;
if (comp instanceof Container) {
CompName = comp.getName();
if (CompName != null) {
System.out.println(CompName);
for (int i = 0; i < controls.length; i++) {
if (CompName.equals(controls[i])) {
if (!found.containsKey(CompName)) {
System.out.println(CompName + " not contain++++");
found.put(CompName, comp);
System.out.println("find:" + CompName);
nameEquals = true;
break;
} else {
System.out.println("contain++++");
}
}
}
}
if (found.size() != controls.length /* && !nameEquals */) {
System.out.println("container:" + comp.getName());
con = (Container) comp;
int count = con.getComponentCount();
for (int i = 0; i < count; i++) {
findComponent(con.getComponent(i), controls, found);
if (found.size() == controls.length)
return;
}
}
} else {
System.out.println("component:" + comp.getName());
}
}
BOS里如何DEP分录字段
最新推荐文章于 2020-12-28 15:51:32 发布