This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot view data in pop-up window in ascending order

 
Jyotsna Pai
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I was looking for some help or advise on the following.
Any help is much appreciated.

I am trying to correct the sequencing of a pop-up window corrected so that they appear in the right sequence.
10 should come after 9, in fact the single digit Code should appear as 01 thru 09. Any help/advise is much appreciated

To display some data in a pop-up window in ascending order the SQL created
in a javascript. The SQL is named "SUPER".

The SQL retrieves the data as sorted in ascending order when run/unit-tested independently in the database.

However, the data is NOT seen in sorted ASCENDING order in the pop-up window on the client side.

The SQL is as follows -



Please note that the a.table_code is of char type and the data it returns is ranging from 1 - 10.
In order for the data to be displayed in ascending order on the client-side pop-up window, I modified the SQL as follows



This also independently returns me data in ascending order when run unit-tested in the database.

However as above, both these SQL's do not return the data in ascending order on the client-side when seen in the new pop-up window.

The code for the JSP that actually runs/invokes the SQL is as follows -


The code for the new pop-up window is as follows -


The JSP code used to display the pop-up is -



Any help or advise is much appreciated.

Thanks in advance!

Cheers,
Jyotsna Pai
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(This isn't an app that anyone besides like developers can use, right?! Like not for the public?)
 
Jyotsna Pai
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it is not for public.

Thanks and Regards,
Jyotsna Pai
 
Jyotsna Pai
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

Thanks to anyone who views the page.
I resolved the issue myself, by changing the code for the JSP that actually runs/invokes the SQL.
I used the Collections.sort() method, using a Comparator to sort Strings that held integers/numbers.

The code for the JSP that actually runs/invokes the SQL is as follows -


Rest all other code remains unchanged.

Thanks.

Best Regards,
Jyotsna Pai
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't even know where to begin, but glad you got it working. For your sake, I hope it never stops working, because tracking down problems in that code will be a nightmare.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic