CellStyleTable & defaultRowSorter

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

CellStyleTable & defaultRowSorter

Postby Humberto Padget » Tue Mar 17, 2009 7:51 am

Hi,

I'm using "CellStyleTable" with "setAutoCreateRowSorter(true)", i just want default JTable's behavior for sort, but doesn't work.
I've a "CustomTableModel" who extends from "AbstractTableModel" then when i delete and add data, especially when delete, your grid try to get data of missed indexes then an NullPointerException appears.

That occurs only when is sorted.
If i put a JTable instead of "CellStyleTable", it works fine.

When i insert data into model, i add a group of data and i call to fireTableDataChanged(). That must be sufficient to update all.

Am i doing something wrong?

Thanks
Humberto Padget
 
Posts: 6
Joined: Mon Feb 02, 2009 2:59 pm
Location: Santiago, Chile

Re: CellStyleTable & defaultRowSorter

Postby JIDE Support » Tue Mar 17, 2009 9:26 am

Could you please create a test case for this bug report so that I can reproduce it?

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37263
Joined: Sun Sep 14, 2003 10:49 am

Re: CellStyleTable & defaultRowSorter

Postby Humberto Padget » Tue Mar 17, 2009 11:18 am

Hi,

I append a simple test. (it's a Netbeans 6.5 Project, i didn't include jide-common.jar, jide-grids.jar)

There are two tables, CellStyleTable and JTable, only CellStyleTable have anormal behavior when modify data on sorted table.


I use Java jdk 1.6.0_10.

Thanks
Attachments
TestCase.rar
test case
(19.56 KiB) Downloaded 2010 times
Humberto Padget
 
Posts: 6
Joined: Mon Feb 02, 2009 2:59 pm
Location: Santiago, Chile

Re: CellStyleTable & defaultRowSorter

Postby Humberto Padget » Wed Mar 18, 2009 4:48 pm

Hi,

Did you can reproduce it?

The error it happens when there are many deleted rows .. for example this random sequence:

Num New Rows : 27
Num New Rows : 186
Num New Rows : 272
Num New Rows : 11

Code: Select all
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 26
        at java.util.Vector.get(Vector.java:694)
        at cl.bcs.test.model.CustomTableModel.getValueAt(CustomTableModel.java:51)
        at javax.swing.JTable.getValueAt(JTable.java:2695)
        at javax.swing.JTable.prepareRenderer(JTable.java:5712)
        at com.jidesoft.grid.JideTable.prepareRenderer(Unknown Source)
        at com.jidesoft.grid.CellStyleTable.prepareRenderer(Unknown Source)
        at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.paintCell(Unknown Source)
        at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.a(Unknown Source)
        at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.paint(Unknown Source)
        at com.jidesoft.plaf.basic.BasicJideTableUI.paint(Unknown Source)
        at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
....


I discovered another problem... must be the same.
If i select sort on one column when table don't have data and i add data, then CellStyleTable don't show data but JTable do it.

Thanks
Humberto Padget
 
Posts: 6
Joined: Mon Feb 02, 2009 2:59 pm
Location: Santiago, Chile

Re: CellStyleTable & defaultRowSorter

Postby JIDE Support » Wed Mar 18, 2009 4:49 pm

I reproduced it and fixed it. It will be included in a release this week. I will let you know when we release it.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37263
Joined: Sun Sep 14, 2003 10:49 am

Re: CellStyleTable & defaultRowSorter

Postby JIDE Support » Thu Mar 19, 2009 8:26 am

Just so you know, we just released 2.5.7 which should fix the bug.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37263
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 10 guests