File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Table sorter going nuts once added another itam

 
Peter Primrose
Ranch Hand
Posts: 755
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy,

I've successfully implemented the table sorter from the sun website. Problem is when I add another item to the table - I get an ArrayIndexOutOfBoundsException.ArrayIndexOutOfBoundsException.

specifying the problem at: return getViewToModel()[viewIndex].modelIndex;
in

public int modelIndex(int viewIndex) {
return getViewToModel()[viewIndex].modelIndex;
}

does anyone know what might be the problem?
thanks

the complete error is below.
 
Thomas Rowland
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am experiencing the same problem. I have struggled with this for days and have resorted to removing the TableSorter unless I can find a solution.

I have tried swapping out the sorterTableModel and replacing it with the original tableModel while updates are happening, but this does not work.

Anyone have any insight they can share?

Thanks,
Tom
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this problem was also posted to sun's forum

http://forum.java.sun.com/thread.jspa?threadID=744037

the solution from 74philip (Hi Craig) is the one you want
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic