We need to be able to display a variable number of columns with unknown column titles. This works fine if no columns are specified, but we also need to enable sorting. It looks like the only way to enable sorting is by specifying the columns to use. Is there a way to enable sorting for all columns?
Also, along the same route, because we don't know what columns must be displayed we're using Hashtables inside a Vector to hold all the data. It doesn't seem like it's possible to use the property value to refer to items in a Hashtable. It looks only for bean getters by the property name. Is that true?
Thank you so much for a great tag library!
Sarel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For sorting, the only way that I know is to use the column tag for each column you want to display.
If the number and the names of the columns are dinamics, I've found a solution creating a collection of the column names and then putting it in the request or in the session.
Hi
We need to be able to display a variable number of columns with unknown column titles. This works fine if no columns are specified, but we also need to enable sorting. It looks like the only way to enable sorting is by specifying the columns to use. Is there a way to enable sorting for all columns?
Also, along the same route, because we don't know what columns must be displayed we're using Hashtables inside a Vector to hold all the data. It doesn't seem like it's possible to use the property value to refer to items in a Hashtable. It looks only for bean getters by the property name. Is that true?
Thank you so much for a great tag library!
Sarel
Using the property on the column tag does work for Hashtables. I was using the wrong key.
So, the only question that remains: is there a way to enable sorting and have displaytag show all columns?
Thanks,
Sarel
For sorting, the only way that I know is to use the column tag for each column you want to display.
If the number and the names of the columns are dinamics, I've found a solution creating a collection of the column names and then putting it in the request or in the session.
Try to look in this thread 'Casual order of columns'
the answer posted at 2005-07-11 12:42 :
https://sourceforge.net/forum/forum.php?thread_id=1296195&forum_id=249318
Bye.
Massimo
That looks like it'll work.
Thank you so much!
Sarel