1.ADFUtils.findIteratoride
DCIteratorBinding dc = ADFUtils.findIterator("LocationsView1Iterator");
2.getViewObjectui
ViewObjectImpl vo = (ViewObjectImpl)dc.getViewObject();
3.getApplicationModulethis
ApplicationModule am = vo.getApplicationModule();
4.当前行code
Row row = vo.getCurrentRow();
Row row = ADFUtils.getRow(richTable);
5.当前行的主键接口
ADFUtils.getOldKey(richTable());
ADFUtils.findIterator("LocationsView1Iterator").getCurrentRowKeyString();
6.多选行ip
List<Row> selectRows = ADFUtils.getTableSelectedRows(richTable);
7.得到全部行ci
RowSetIterator rsi = ADFUtils.findIterator("XsxxglXszcVo1Iterator").getViewObject().createRowSetIterator(null); while (rsi.hasNext()) { Row row = rsi.next(); row.setAttribute("Fdyqr", ZT_ONE); }
xsjbxxVo.setRangeSize(-1); Row[] allRowsInRange = xsjbxxVo.getAllRowsInRange();
8.下拉列表多选rem
List njList =ADFUtils.getSelectListValueMany("XtglNjLov1", "Dm"); //拿到年级多选值
9.下拉列表单选。ADFUtils.getSelectListValueOne("ZcztLov1", "ZcztId");字符串
<af:selectOneChoice value="#{bindings.ZcztLov1.inputValue}" label="辅导员注册状态" required="#{bindings.ZcztLov1.hints.mandatory}" shortDesc="#{bindings.ZcztLov1.hints.tooltip}" id="soc4"> <f:selectItems value="#{bindings.ZcztLov1.items}" id="si4"/> </af:selectOneChoice>
10.获取inputText的值。ADFUtils.getBoundAttributeValueget
BigDecimal ysje = (BigDecimal)ADFUtils.getBoundAttributeValue("Ysje");
11.根据一个绑定表达式返回其匹配字符串。
ADFContext.getCurrent().getPageFlowScope().get("xnxqOp"); ADFContext.getCurrent().getPageFlowScope().put("xnxqOp","addData");
或
JSFUtils.resolveExpressionAsString("#{pageFlowScope.sfEdit}"); JSFUtils.setExpressionValue("#{pageFlowScope.sfEdit}", "false");
12.页面绑定(发布成接口的)方法并调用。
OperationBinding op = ADFUtils.findOperation("query");
Map map = op.getParamsMap();//给方法传入参数 map.put("xn", xn); map.put("xq", xq); map.put("dw", dwStr); //单位(学院) op.execute();
获取返回值
String msg = (String)op.getResult();
13.VoLink级联删除,在主表Row Class(JcglJcpdzbViewRowImpl)里重写remove方法。
@Override public void remove() { RowIterator it = (RowIterator) getAttributeInternal(JCGLJCPDMXVIEW); it.reset(); while (it.hasNext()) { it.next().remove(); } super.remove(); }
14.VO绑定变量默认值(如学年学期)
/** * 获取当前学年学期 * 1:当前学年学期,2:开课学年学期,3:排课学年学期 * 4:选课学年学期,5:考试学年学期,6:注册学年学期 */ public Map getXnxqByType() { try { JcglServiceAMImpl am = (JcglServiceAMImpl)this.getApplicationModule(); XtglXnxqszbViewImpl xnxqVo = am.getXtglXnxqszbView1(); return xnxqVo.getXnxqByType(1); } catch (Exception e) { e.printStackTrace(); } return null; }
v_xn
if(null!=adf.object.viewObject.getXnxqByType()){return adf.object.viewObject.getXnxqByType().get("xndm");};