Ivan,

Clever idea.  I had not thought of using xml and xsl to sort, but then
again, I've only recently begun using xml with my JSP/Java code.

I for one would be interested in seeing your code.

Celeste

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Ivan
Sent: Tuesday, May 08, 2001 9:01 AM
To: [EMAIL PROTECTED]
Subject: Re: Sorting table columns


Hello,
    I had the same problem and I found a non standard solution but saved my
ass :) since my customer use ie5 I used a xml & xsl file and I can sort and
resort without reloading the page... indeed I sort the xml elements with
javascript... the only problem is that I only can make string
(alphanumerically) sorting... (a pity), but now they can sort table columns.
If some one likes the idea, I can send the xml & xsl code to see what I
mean.


Ivan.


----- Original Message -----
From: Shahaji Kadam. <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 08, 2001 6:38 AM
Subject: Re: Sorting table columns


> Hi Sai,
>
> if you don't want to use ORDER BY then you have to go for some other data
> structure... like Hash Table, vector, or array.
> But if you want to use SORTED recordset instead (without ORDER BY) then
try
> this -- take sorting column values (after the unsorted resultset is
returned)
> in Array and sort the array --------then according to sorted array "Build"
the
> recordset object again (same or new recordset) .... use it.
>
> I had done this in ASP using ADO ..... but not tried in JSP (or Java)
......
> donno if it is possible here.......if not then you have to go for array
like
> solution.
>
> good luck.
>
> Shahaji.Kadam
>
> -----Original Message-----
> From: Sairam.Kuppuswamy [SMTP:[EMAIL PROTECTED]]
> Sent: May 07, 2001 10:56 PM
> To: JSP-INTEREST
> Cc: Sairam.Kuppuswamy
> Subject: Re: Sorting table columns
> Importance: High
>
> I too am facing a similar problem, but the difference is I need to Sort
the
> column only with the fetched data set (The SQL Order By could not be
used).
> With this case I thought of
> using an Hash Array for the fetched Data Set and then, on the User-Clicked
> column (which would be a particular index of the Array), the Sort routine
> should be working.
>
> I am still working on it, but in vain.
>
> If somebody has a better solution or the same solution, please extend your
help
> for this Sort functionality.
>
> thanks in-advance.
>
> Sai
> mailto:[EMAIL PROTECTED]
>
>
>
> -----Original Message-----
> From: Paul Meshkovsky [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 1:16 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Sorting table columns
>
>
> It is probably resolved but I just want do add
>
>  <th> <a href=yourjsp.jsp?filed=COLUMN_NAME1>COLUMN NAME</a></th>
>
> you just have to add in your sql an order or group by clause where value
of
> filed will go
>
> Paul.
>
>
>
> > -----Original Message-----
> > From: Zeltser, Mark [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, May 03, 2001 3:17 PM
> > To:   [EMAIL PROTECTED]
> > Subject:      Re: Sorting table columns
> >
> > One approach is to let database handle the sorting. You can pass a
parameter
> > (each column will represent different parameter) to store procedure
which
> > will return you new table sorted by specified column.
> >
> > Mark.
> >
> >
> >
> > > -----Original Message-----
> > > From: Schulz Ryan C [SMTP:[EMAIL PROTECTED]]
> > > Sent: Thursday, May 03, 2001 3:00 PM
> > > To:   [EMAIL PROTECTED]
> > > Subject:      Sorting table columns
> > >
> > > Has anyone had any experience using a servlet to sort table columns?
I'm
> > > filling a table dynamically and I want to sort the results by columns
with
> > > the column headers being links that will sort the data in that
particular
> > > column.
> > >
> > > I would appreciate any feedback on this.
> > >
> > >
==========================================================================
> > > =
> > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > > JSP-INTEREST".
> > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > > DIGEST".
> > > Some relevant FAQs on JSP/Servlets can be found at:
> > >
> > >  http://java.sun.com/products/jsp/faq.html
> > >  http://www.esperanto.org.nz/jsp/jspfaq.html
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >
>
> --------------------------------------------------------------------------
----
> > This message is intended only for the personal and confidential use of
the
> > designated recipient(s) named above.  If you are not the intended
recipient of
> > this message you are hereby notified that any review, dissemination,
> > distribution or copying of this message is strictly prohibited.  This
> > communication is for information purposes only and should not be
regarded as
> > an offer to sell or as a solicitation of an offer to buy any financial
> > product, an official confirmation of any transaction, or as an official
> > statement of Lehman Brothers Inc.  Email transmission cannot be
guaranteed to
> > be secure or error-free.  Therefore, we do not represent that this
information
> > is complete or accurate and it should not be relied upon as such.  All
> > information is subject to change without notice.
> >
> >
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to