Java Mailing List Archive

http://www.junlu.com/

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

Re: sorting query results in J2EE

Vinodh Valleri (RBIN/EEC2)

2003-09-25


Hi Stan,
    For displaying results in table format in JSP better Use Display tag
Library available in jakarata.apache.net. By using this u can sort and can handle
Other functionality's also..

Thanks & regards,
Vinodh Valleri
Robert Bosch India Limited
Dept. EEC / EEC2 ? : +91(80)508-1460
No.123, Industrial Layout Fax : +91(80)571-1865
Hosur Road, Koramangala ? : vinodh.valleri@(protected)
Bangalore 560 095, India


-----Original Message-----
From:  Stan Ou [mailto:jou128@(protected)]
Sent:  Wednesday, 24. September 2003 11:26 PM
To:   J2EE-INTEREST@(protected)
Subject:     sorting query results in J2EE

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.

I've seen it being done this way:
In the stored procedure, put the query in a string,
like this:
(pseudo code)
a.set @sqlString = "select blah blah ... order by "
+ @inParamSortOption
b. execute @sqlString

this is the low tech way but gets the job done. But
I'd like to see a better way.

stan




__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

===========================================================================
To unsubscribe, send email to listserv@(protected)
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.