yes, you're right, sort the table by javascript or java would be better, but I'm pretty lazy and the SQL solution is easiest :-p. Moreover, it's a local application with no massive data, and I don't think that the SQL queries slow the server. However, I could in the future have to do it in a better way on java/javascript.
----- Original Message ----- From: "Nathan Maves" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, July 10, 2006 11:56 PM Subject: Re: Dynamic Order By > Just a thought but I would not query the DB every time you need to re- > sort your table. I would do all of the sorting in plain old java, > or better yet why not do it client side via javascript? > > Nathan > > On Jul 10, 2006, at 2:25 PM, Nicolas Duroc wrote: > > > Hello, > > > > I have a jsp page who displays a table of objects, and I would like > > to sort the table in function of the columns, I use so an "order by". > > I tried to use a select with the "ordered column" in parameter in > > the SQL Map, but it didn't work. The "ORDER BY" was not "executed". > > I found few explanations about "Simple Dynamic SQL Elements", but > > not really explicit. > > > > If anyone has some examples about use of Dynamic SQL Elements ? > > > > Thanks in advance > > > > Regards, > > > > Nicolas Duroc > > >
