ADF Richtable RowSelection= 'multiple'时,用Ctrl+A实现全选报错

Problem:

 

java.lang.UnsupportedOperationException: ADFv: Unsupported operation exception.
 at oracle.adfinternal.view.faces.model.binding.CurrencyRowKeySet.invertAll(CurrencyRowKeySet.java:99)
 at oracle.adfinternal.view.faces.renderkit.rich.TableRendererUtils.decodeSelectedRowKeys(TableRendererUtils.java:437)
 at oracle.adfinternal.view.faces.renderkit.rich.table.BaseTableRenderer.decodeIncompatiblePropertyKey(BaseTableRenderer.java:217)
 at oracle.adf.view.rich.render.RichRenderer.decode(RichRenderer.java:208)
 at org.apache.myfaces.trinidad.component.UIXComponentBase.__rendererDecode(UIXComponentBase.java:1107)
 at org.apache.myfaces.trinidad.component.UIXComponentBase.decode(UIXComponentBase.java:701)
 at org.apache.myfaces.trinidad.component.UIXTable.decode(UIXTable.java:137)
 at org.apache.myfaces.trinidad.component.UIXCollection.processDecodes(UIXCollection.java:187)
 at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$ApplyRequestValuesCallback.invokeContextCallback(LifecycleImpl.java:1150)
 at org.apache.myfaces.trinidad.component.UIXCollection.invokeOnComponent(UIXCollection.java:1024)
 at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1312)
 at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnNamingContainerComponent(UIXComponentBase.java:1362)
 at org.apache.myfaces.trinidad.component.UIXDecorateCollection.invokeOnComponent(UIXDecorateCollection.java:121)
 at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1312)
 at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1406)
 at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1312)
 at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnNamingContainerComponent(UIXComponentBase.java:1362)
 at oracle.adf.view.rich.component.fragment.UIXRegion.invokeOnComponent(UIXRegion.java:529)
 at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1312)

 

Solution:

原因是:在生成RichTable时,把RowSelection的勾打上,在后台同时生成了以下代码

          selectedRowKeys="#{bindings.ExpsCnlRetailerAndAddressVO1.collectionModel.selectedRow}"
                selectionListener="#{bindings.ExpsCnlRetailerAndAddressVO1.collectionModel.makeCurrent}"

虽然把RowSelection变成了multiple,但是上面的代码并没有跟着删除,错误就是从selected row key这边报错的,去掉该代码,Ctrl+A实现了全选功能,同时上述代码还会引起迭代选中的行时,选中的条数出现问题,如,界面上显示已选中3行,在后台迭代进行删除时,实际上只获得了一行
               

你可能感兴趣的:(ADF Richtable RowSelection= 'multiple'时,用Ctrl+A实现全选报错)