由Service SelectionListener填充的表

时间:2014-05-15 20:15:46

标签: oracle listener selection oracle-adf

我正在努力在一个由服务填充的只读表上获取一个正在运行的selectionListener(在DataControls中公开)。没有涉及实体/ VO / ApplicationModule。我使用ADF 11.1.1.5

我的jsff

<af:panelStretchLayout id="psl1">
    <f:facet name="center">
      <af:table value="#{bindings.DocumentMetadatenDTO.collectionModel}"
                var="row" rows="#{bindings.DocumentMetadatenDTO.rangeSize}"
                emptyText="Empty"
                fetchSize="#{bindings.DocumentMetadatenDTO.rangeSize}"
                rowBandingInterval="0"
                rowSelection="single" id="t1"
                selectionListener="#{pageFlowScope.documentSearchBean.documentTableSelectionListener}"
                partialTriggers="::psl1">

my pageFlowScoped Bean

public void documentTableSelectionListener(SelectionEvent selectionEvent) {
    RichTable table = (RichTable) selectionEvent.getSource();
    Object selection = table.getSelectedRowData(); // **returns null**
}

我的绑定定义

<executables>
<methodIterator Binds="getDocuments.result"
  DataControl="DocumentSearchServiceMock" RangeSize="-1"
  BeanClass="****.model.DocumentMetadatenDTO"
  id="getDocumentsIterator"/>
 </executables>
 <bindings>
<methodAction id="getDocuments" RequiresUpdateModel="true"
              Action="invokeMethod" MethodName="getDocuments"
              IsViewObjectMethod="false"
              DataControl="DocumentSearchServiceMock"
              InstanceName="DocumentSearchServiceMock.dataProvider"
              ReturnName="data.DocumentSearchServiceMock.methodResults.getDocuments_DocumentSearchServiceMock_dataProvider_getDocuments_result">
  <NamedData NDName="query"
             NDValue="#{pageFlowScope.documentSearchBean.documentSearchQuery}"
             NDType="****.model.DocumentSearchQuery"/>
</methodAction>
<tree IterBinding="getDocumentsIterator" id="DocumentMetadatenDTO">
  <nodeDefinition DefName="****.model.DocumentMetadatenDTO"
                  Name="DocumentMetadatenDTO0">
    <AttrNames>
      <Item Value="id"/>
      <Item Value="creationDate"/>
      <Item Value="zielArchive"/>
      <Item Value="documentType"/>
      <Item Value="documentSource"/>
    </AttrNames>
  </nodeDefinition>
</tree>
<attributeValues IterBinding="getDocumentsIterator" id="id">
  <AttrNames>
    <Item Value="id"/>
  </AttrNames>
</attributeValues>
</bindings>

有人有任何想法吗?

PS:我已经尝试使用Oracle中的this示例更新迭代器当前行,然后从绑定中选择一个属性值,但没有成功。

1 个答案:

答案 0 :(得分:0)

您的示波器搞砸了。 对页面上组件的引用(例如表)不应该在pageFlowScope bean中。