List Form表單常用功能
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");