我在页面流范围中有数组列表。
List<EtaxDetail> lstEtaxDetail
然后,我将它绑定到表。
<af:table value="#{pageFlowScope.ABCBean.lstEtaxDetail}">
通过ViewIterator进行绑定时,我使用了代码:
DCIteratorBinding dcIterACCTNO = ADFUtils.findIterator("");
ViewObject vo = dcIterACCTNO.getViewObject();
Row cRow = vo.getCurrentRow();
如何在此表中获取当前选定的行?
DCBindingContainer bindings = this.getDCBindingContainer();
DCIteratorBinding itorBinding =
bindings.findIteratorBinding("XxbecErrConsoleLinesStgView1Iterator");//ur iterator name
RowSetIterator rsi = itorBinding.getRowSetIterator();
ViewObject ioOrderLines= itorBinding.getViewObject();
if(itorBinding!= null){
Row currentRow = itorBinding.getCurrentRow();
if(currentRow != null){
obj=currentRow.getAttribute("InterfaceHeaderId");//ur column name which u want to fetch
System.out.println(currentRow.getAttribute("InterfaceHeaderId"));
}}
//并且getDCBindingContainer()
方法代码的代码是 - >
public DCBindingContainer getDCBindingContainer() {
DCBindingContainer bindingsContainer =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
return bindingsContainer;