获取当前行表ADF

问题描述 投票:0回答:2

我在页面流范围中有数组列表。

 List<EtaxDetail> lstEtaxDetail

然后,我将它绑定到表。

<af:table value="#{pageFlowScope.ABCBean.lstEtaxDetail}">

通过ViewIterator进行绑定时,我使用了代码:

 DCIteratorBinding dcIterACCTNO = ADFUtils.findIterator("");
 ViewObject vo = dcIterACCTNO.getViewObject();
 Row cRow = vo.getCurrentRow(); 

如何在此表中获取当前选定的行?

java arraylist binding oracle-adf
2个回答
0
投票

你需要在你的SelectionListener上提供你自己的af:table。很好的例子可以找到herehere


-1
投票
    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;
© www.soinside.com 2019 - 2024. All rights reserved.