1、非树状的,继承AbstractListPlugin
2、 ListView获取当前实体id
BillList list = this.getControl(BILLLISTID);
String billEntityId = list.getEntityId();
3、List获取当前选中行:ListSelectedRowCollection
BillList billList = this.getControl(BILLLISTID);
billList.getSelectedRows()
4、获取ListSelectedRow里的id
String pk = listSelectedRow.getPrimaryKeyValue().toString()
5、//获取listView是否选中数据
IListView listView = (IListView) getView();
boolean hasNoSelData = "focus".equals(this.getParameter().get("listDelScope"))? listView.getFocusRow() < 0 : listView.getSelectedRows().size() == 0;
6、//列表页面设置过滤条件 在initialize方法里设置
BillList list = this.getControl("billlistap");
ListShowParameter showParam = (ListShowParameter) this.getView().getFormShowParameter();
//showParam.setIsolationOrg(false);
ListFilterParameter listFilterParameter = showParam.getListFilterParameter();
String qFilterStr = listFilterParameter.getQFilter();
if (StringUtils.isNotEmpty(qFilterStr)) {
// 如果有传过滤条件,以传的过滤条件为准
list.setListFilter(qFilterStr);
} else {
QFilter baseBillFilter = getBaseBillFilter();
FilterParameter filterParameter = new FilterParameter();
filterParameter.setFilter(baseBillFilter);
list.setFilterParameter(filterParameter);
}
//设置排序
list.setOrderBy("bizdate desc,billno desc");
7、//审核后刷新页面
public void afterDoOperation(AfterDoOperationEventArgs e) {
super.afterDoOperation(e);
String objectId = e.getObjectId();
if ("approval".equalsIgnoreCase(objectId)) {
BillList list = this.getControl("billlistap");
list.refresh();
}
}
8、//列表界面调用查看事件
IListView listView = (IListView) this.getView();
listView.invokeOperation("view");
BillList list = this.getControl(BILLLISTID);
String billEntityId = list.getEntityId();
3、List获取当前选中行:ListSelectedRowCollection
BillList billList = this.getControl(BILLLISTID);
billList.getSelectedRows()
4、获取ListSelectedRow里的id
String pk = listSelectedRow.getPrimaryKeyValue().toString()
5、//获取listView是否选中数据
IListView listView = (IListView) getView();
boolean hasNoSelData = "focus".equals(this.getParameter().get("listDelScope"))? listView.getFocusRow() < 0 : listView.getSelectedRows().size() == 0;
6、//列表页面设置过滤条件 在initialize方法里设置
BillList list = this.getControl("billlistap");
ListShowParameter showParam = (ListShowParameter) this.getView().getFormShowParameter();
//showParam.setIsolationOrg(false);
ListFilterParameter listFilterParameter = showParam.getListFilterParameter();
String qFilterStr = listFilterParameter.getQFilter();
if (StringUtils.isNotEmpty(qFilterStr)) {
// 如果有传过滤条件,以传的过滤条件为准
list.setListFilter(qFilterStr);
} else {
QFilter baseBillFilter = getBaseBillFilter();
FilterParameter filterParameter = new FilterParameter();
filterParameter.setFilter(baseBillFilter);
list.setFilterParameter(filterParameter);
}
//设置排序
list.setOrderBy("bizdate desc,billno desc");
7、//审核后刷新页面
public void afterDoOperation(AfterDoOperationEventArgs e) {
super.afterDoOperation(e);
String objectId = e.getObjectId();
if ("approval".equalsIgnoreCase(objectId)) {
BillList list = this.getControl("billlistap");
list.refresh();
}
}
8、//列表界面调用查看事件
IListView listView = (IListView) this.getView();
listView.invokeOperation("view");