Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sorting order creating problems  RSS feed

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I've this code,from which i pass in "index" and "sort" to my java class,sort the appropriate column and display the results.The problem is
it follows a strict order(asc/desc/asc/desc/asc).....for all the columns.But I need to change it as(asc/desc/asc/desc) for each column.
It means initially if I click any column,it should sort it in ascending order and it should not affect any other colums sorting order(asc or desc).I think you get my point.Please tell me what changes are required.
 
author & internet detective
Marshal
Posts: 38151
617
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amrit,
You need an array of Strings or boolean stored in the session. That way each one can be manipulated separated and it persists across web pages.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!