0

Im trying to implement a sort by in a column inside a p:dataTable, i use a dataModel to get the data to the table, if i use a arrayList to get the data the sort by works, theres a way to make the sort by work with a dataModel?

The error i get when using dataModel:

Error Rendering View[/private/tarefas/tarefaListagem.xhtml]

java.lang.UnsupportedOperationException: null at java.util.Collections$UnmodifiableList.sort(Collections.java:1333) ~[na:1.8.0_265] at java.util.Collections.sort(Collections.java:177) ~[na:1.8.0_265]

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
FoxyAri
  • 23
  • 4

1 Answers1

0

The problem is in the unmodifiable list.

Do it new ArrayList().addAll(unmodifiable list)

Enter
  • 1
  • 1