Remove table row not working properly

I’ve created a table on my screen by dragging ang dropping a document list.
I’ve also added a ‘Add Row Button’ and a ‘Remove Row Button’ (part of table Row Tools) to the table.
Now, when I press the create/remove button, a row is created/removed on the client side and when form data is posted to the server, the table provider is updated.
Create Row button works fine but when I use the Delete row button and then post the data I see following exception in the log -


2007-09-10 16:13:27 CST (jsf : ERROR) [RID:1349] - Pre-render phase of the portlet failed
java.lang.UnsupportedOperationException
at java.util.AbstractList.remove(AbstractList.java:172)
at java.util.AbstractList$Itr.remove(AbstractList.java:437)
at java.util.AbstractList.removeRange(AbstractList.java:662)
at java.util.AbstractList.clear(AbstractList.java:258)
at com.webmethods.caf.faces.data.object.SelectableListTableContentProvider.updateOriginalList(SelectableListTableContentProvider.java:408)
at com.webmethods.caf.faces.data.object.SelectableListTableContentProvider.deleteRow(SelectableListTableContentProvider.java:266)


I also noticed that when I delete existing rows and then add new rows to the table, then also it works fine as long as # of rows deleted <= #="" of="" new="" rows="" added.="" Is="" this="" a="" known="" bug="" or="" am="" I="" missing="" something="" here?="" />

It’s a bug which is fixed in 7.1.

The workaround is to assign Source List property instead of Source Array on the provider which means you may need to convert your array to list via a helper property, and make sure you don’t use Arrays.asList(array) API because it will create read only list and you’ll get the same error.

Thanks,
Sergei