参照添加监听
程序员文章站
2022-03-04 13:47:33
...
// 项目名称
BillItem itemname = builder.refPane("hx_blankvoucher_mng.itemname",
"项目名称", "<nc.ui.hxbusi.ref.KongBaiItemnameModel>");
((UIRefPane) itemname.getComponent()).getRefModel().reloadData();// 清除缓存
// 合同编号
final BillItem contractcode = builder.refPane(
"hx_blankvoucher_mng.contractcode", "合同编号",
"<nc.ui.hxbusi.ref.KongBaiContractcodeModel>");
((UIRefPane) contractcode.getComponent()).getRefModel().reloadData();// 清除缓存
getQueryManager().setQueryPanelBuilder(builder);
getQueryManager().setLoaded(true);
// 添加监听
((UIRefPane) itemname.getComponent())
.addValueChangedListener(new ValueChangedListener() {
public void valueChanged(ValueChangedEvent event) {
String itemname = getQueryManager().getBillCardPanel()
.getHeadItem("hx_blankvoucher_mng.itemname")
.getValueObject() == null ? ""
: getQueryManager().getBillCardPanel()
.getHeadItem(
"hx_blankvoucher_mng.itemname")
.getValueObject().toString();
if (StringUtils.isNotEmpty(itemname)) {
((UIRefPane) contractcode.getComponent())
.setWhereString(" hx_blankvoucher_mng.itemname = '"
+ itemname + "' ");
}
}
});
上一篇: 类似九宫格的tableViewCell
下一篇: Cocos_2dx文字UI剪切