/** *对选择记录进行可操作性判断 * @param actionEvent */ public void actionSetParam(ActionEvent actionEvent) { if (JSFUtils.resolveExpression("#{pageFlowScope.cz}") == null) { //操作判断 return; } DCIteratorBinding dcIt = ADFUtils.findIterator("JyglJyxysfpView1Iterator"); ViewObject xysfpImpl = dcIt.getViewObject(); Row[] rows = xysfpImpl.getFilteredRows("IsChecked", true); int length = rows.length; String cz = JSFUtils.resolveExpression("#{pageFlowScope.cz}").toString(); if (length == 0) { JSFUtils.addFacesErrorMessage("请选择记录"); return; } else if (cz.equals("update") && length > 1) { JSFUtils.addFacesErrorMessage("修改时每次只能选择一条记录"); return; } else if (cz.equals("delete")) { //删除 this.action = "delete"; return; } else { this.action = "update"; xysfpImpl.setCurrentRow(rows[0]); return; } }
批量删