I've made a more semi-generic HibernateDataSource that works based upon a SQL query. I seem to need to do that a lot, and using the Criteria API just doesn't cut it sometimes. I can post that If people are interested. It modifies the query to add "order by" based on the sort criteria, so it only works on SQLQuery objects, but could be easily adapted to work with regular Query objects. Oh, it also has provisions to export as CSV.

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Mar 25, 2011, at 9:24 AM, dragan.sahpas...@gmail.com wrote:

I guess this could be done when tapestry creates the GridModel and
GridDataSource from the List<Person>. Off course for smarter
HibernateDataSource more work needs to be done by pushing the sort in the
hibernate criteria.

Maybe we could do this as a configuration symbol maybe.

Cheers,
Dragan Sahpaski



On Fri, Mar 25, 2011 at 10:18 AM, Vangel V. Ajanovski <a...@ii.edu.mk>wrote:

On 03/24/2011 09:10 PM, dragan.sahpas...@gmail.com wrote:

2. Grid enhacements: 1. better pager, 2. sorting params go in URL, 3.
Better
HibernateDataSource (more generic). 4.Changing column order and visibility
and saving this in a db.

+1

And if the philosophy of Tapestry is to fix things that get you most
annoyed as a developer (as Igor writes in his new book) than I would suggest
an addition.
If I have a grid sourced over list of Person-s and if I define a custom column on the expansion ${person.country.title} the model for this column is not created, so for example there is no option to sort the grid based on it's values. So now, I have to create the model manually and assign it to the grid component. And in fact - if you have a heavily normalized domain
(database) this is in 99% of the cases.

I'm not sure if this is fixed in latest version or fixed with some
additional components, but it would be nice to have it in the core.



Reply via email to