I've dataTable-element and I want the content to be sortable. I'm using the following code:
I think the sortBy-Attribute is wrong - I fiddled around a bit but no success. I'm thankful for help. asked 26.11.2013 at 10:52 Nikel Weis |
The sorting of the DataTable works different with Recordset and List<e>. If you have a recordset you can sort like this:
If you have List<e> it works like Daniel said:
I think they have diffrence because of the structur. RS: List: answered 27.11.2013 at 12:13 Raphael Bürgin By the way - this works accordingly for filter mechanism.
(28.11.2013 at 09:19)
Nikel Weis
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 26.11.2013 at 10:52
Seen: 6,412 times
Last updated: 28.11.2013 at 09:19
Hi did you check this example?:
I think you can't read the data out of the Array whitin the sortyBy-tag.
Hey. Jep. I've checked the example. I also tried different variations like in the sortBy-attribute like "#{project['project_id']}" or project_id or project.project_id. The problem is that I have to access a property in the array to be able to sort it.
Assuming it is a one-dimensional Array/ArrayList the example says you only have to deliver the arrayname.
Your bean contains a List<project> called 'projects' and a Project has a field long 'project_id'.
This solution works for me.