Skip to Content
author's profile photo Former Member
Former Member

Sorting problem in Tables

I've got a very strange problem while sorting table columns in WebDynpro Java.

I followed every step in the tutorial and imported the TableSorter.java into my project. But the columns in my table is still unsortable. I tried every effort but failed to make it sortable. Anyone encountered the same problem with me? Thanks in advance!

PS: I strictly followed the tutorial chapter 11's steps so do not tell me refer to that tutorial.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 05:23 AM

    Hi Sam,

    In the table columns ,sort icon is available?? Have u tried to check whether the onSort action is getting called or not??

    put some print statement in onSort event handler & check.

    regards

    Sumit

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello Sumit,

      I've just searched the forum again and found a post answered by Armin Reichert:

      "A possible reason might be that you have added table columns using the "GroupedColumns" aggregation (which is default in NW04s) but your TableSorter code still assumes that the columns are in the "Columns" aggregation (was default in NW04)."

      The way to resolve this issue is simple as follow:

      Replace

      for (Iterator it = table.iterateColumns(); it.hasNext(); ++index)

      by

      for (Iterator it = table.iterateGroupedColumns(); it.hasNext(); ++index)

      in your TableSorter.java.

      I tried this and it worked! Thank you Sumit.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.