0
我很努力得到一個工作selectionListener在由服務填充的只讀表(由DataControls公開)。不涉及實體/ VO/ApplicationModule。我使用ADF 11.1.1.5表由服務SelectionListener填充
我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">
我pageFlowScoped豆:
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示例更新迭代器當前行,然後從綁定中選擇一個屬性值,但都沒有成功。
嗨謝謝,非常感謝您的反饋。但是這個bean的範圍在這裏沒有什麼可做的,或者?如果bean是請求作用域的例子,則會發生同樣的問題。爲什麼如果將PageFlow作用域bean的引用引用到btw中,它會變得如此糟糕? –