Welcome to Dream.In.Code
Become a Java Expert!

Join 149,515 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,343 people online right now. Registration is fast and FREE... Join Now!




How to sort the result return from a web service.

 
Reply to this topicStart new topic

How to sort the result return from a web service., How to sort the result return from a web service.

jadeite100
27 Jun, 2007 - 05:57 PM
Post #1

New D.I.C Head
*

Joined: 12 Jun, 2007
Posts: 4


My Contributions
Hi All:

I am using Weblogic 9.2, Web Services Client, and Struts.
I have a java client in struts that calls a web services.
The "ID" field contains a Java integer.
The "First_Name" is a Java String.
The "Effective_Date" field is a Java date field.
The web service returns an arrayList.
From the arrayList, I displayed the result as the following:

ID FIRST_NAME EFFECTIVE_DATE
-- --------- -------------
3 John 9/10/2007
2 Andrew 1/11/2006
5 Peter 3/4/2006

The "ID" header is a link.
The "First Name" header is a link.
The "EFFECTIVE_Date" is a link.

If I clicked on the link "ID", the first time, it will sort the rows in ascending
order like the following:

ID FIRST_NAME EFFECTIVE_DATE
-- --------- -------------
2 Andrew 1/11/2006
3 John 9/10/2007
5 Peter 3/4/2006

If I clicked on the link "ID", the second time, it will sort the rows in descending
order like the following:
ID FIRST_NAME EFFECTIVE_DATE
-- --------- -------------
5 Peter 3/4/2006
3 John 9/10/2007
2 Andrew 1/11/2006

If I clicked on the "First_Name" field the first time, it will sort the rows in
desceding order.
If I clicked on the "First_Name" field the second time, it will sort the rows in
ascending order.

This applies the same for the "EFFECTIVE_DATE".

Any hint would be greatly appreciate.

Yours,

Frustrated.



User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 07:59PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month