This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Table sorter going nuts once added another itam

 
Peter Primrose
Ranch Hand
Posts: 755
  • 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
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic