Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Interest »

Re: sorting query results in J2EE

Renato

2003-09-24

Replies:

Dear Chester,

all he wants to do is to sort the list at the client side as the list is too
small...

Dear Stan,

You can do this very well working with XML.

Regards,

Renato

----- Original Message -----
From: "Chester Chen" <chester.chen@(protected)>
To: <J2EE-INTEREST@(protected)>
Sent: Wednesday, September 24, 2003 4:20 PM
Subject: Re: sorting query results in J2EE


> unless you returned the WHOLE list from the query,
> otherwise, sorting on client side will result in incorrect dispaly.
>
> And in many cases, it's impossible to bring the WHOLE list to client side
> as the list is too large.
>
> Also, sorting at client side may also cause memory usage to go up when the
> list is large.
>
> Just let the database do the sorting and return the sub-set of list you
care
> back to clients.
>
> Chester
> > -----Original Message-----
> > From: Tim Wood [mailto:timwood0@(protected)]
> > Sent: Wednesday, September 24, 2003 12:10 PM
> > To: J2EE-INTEREST@(protected)
> > Subject: Re: sorting query results in J2EE
> >
> >
> > At 10:55 AM 09/24/03, Stan Ou wrote:
> > >Hi all,
> > >
> > >I have a sql query that joins 5 or 6 tables that
> > >returns 100 to 200 records. The result is wrapped in a
> > >VO and is rendered in a JSP by html table. the user
> > >can click one of the 4 column headings to sort the
> > >result. what is the best to achieve this ? thanks in
> > >advance.
> >
> > Run the query and dump the results into Javascript arrays
> > generated by the JSP. Then have the Javascript do the
> > sorting on the client side. Don't bother the database with it.
> > TW
> >
> > ==============================================================
> > =============
> > To unsubscribe, send email to listserv@(protected)
> > include in the body
> > of the message "signoff J2EE-INTEREST". For general help,
> > send email to
> > listserv@(protected)".
> >
>
>
===========================================================================
> To unsubscribe, send email to listserv@(protected)
body
> of the message "signoff J2EE-INTEREST". For general help, send email to
> listserv@(protected)".
>

===========================================================================
To unsubscribe, send email to listserv@(protected)
of the message "signoff J2EE-INTEREST". For general help, send email to
listserv@(protected)".


©2008 junlu.com - Jax Systems, LLC, U.S.A.