Re: [Wicket-user] More examples of sorting?

2006-07-19 Thread Eelco Hillenius
As an alternative - to see a complete working example that works with Hibernate - you could look at wicket-contrib-examples, wicket.examples.cdapp and SearchPage/ SearchModel in particular. In general, we consider using one of extension's repeater classes to be a better way to go in general, but

Re: [Wicket-user] More examples of sorting?

2006-07-18 Thread Igor Vaynberg
what could be simpler then the dataview? its just like a listview only instead of being fed off the list it is fed from the idataprovider.class mydataprovider implements idataprovider() { iterator iterator(int first, int count) { return mydao.findcontacts(first, count).iterator(); } int size() {

Re: [Wicket-user] More examples of sorting?

2006-07-18 Thread Vincent Jenks
Currently I don't have anything like the ContactsDatabase class in 'examples' - I'm just pulling a list of data and displaying in a ListViewbut it appears now that I'm browsing through I'm going to have to create one and implement some of the methods like you have in order to get

Re: [Wicket-user] More examples of sorting?

2006-07-18 Thread Igor Vaynberg
yep, you have to code your daos with paging and sorting in mind, it cannot be slapped on as an afterthought.let me give you some cluessee the attached QueryParam class, all my finder dao methods take it so that they can page/sort accordingly. hope it gets you started-IgorOn 7/18/06, Vincent Jenks

Re: [Wicket-user] More examples of sorting?

2006-07-18 Thread Vincent Jenks
Well, I don't have DAOs in this particular project - it's an EJB3 project where I'm simply using SLSBs as DAOsso I have the EntityManager to work from and I should be able to bring the two together to facilitate this... This may be easier than I thought On 7/18/06, Igor Vaynberg [EMAIL

Re: [Wicket-user] More examples of sorting?

2006-07-18 Thread Igor Vaynberg
then the only semidifficult part is the sorting - you need to come up with some utils that append the sort for you.as far as paging it would translate directly tosession.setFirstResult(queryparam.getFirst()).setMaxResults( queryparam.getCount());-IgorOn 7/18/06, Vincent Jenks [EMAIL PROTECTED]

Re: [Wicket-user] More examples of sorting?

2006-07-18 Thread Vincent Jenks
Wow...ok...I'm making a total disaster of this. I can't help but think there's an easier way. :( I've got this method in what we could call a dao: public ListIncident getFiltered(int first, int count, String orderBy) { String query = select i from Incident i

Re: [Wicket-user] More examples of sorting?

2006-07-18 Thread Vincent Jenks
, July 18, 2006 4:50 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] More examples of sorting? Well, I don't have DAOs in this particular project - it's an EJB3 project where I'm simply using SLSBs as DAOsso I have the EntityManager to work from and I should be able