Hi,

yes, you are right. i have already discussed this(see mailing list archives). One possible solution for this is to leave one empty row in the table(i know this looks not really pretty)  or use this patch(see attachment).

Cheers
alex.d
Hi,

This technique doesn't work when deleting the last row of a table.  An
exception is received and the table doesn't repaint.   :-(


dperez wrote:
  
Hi all,

It couldn't be simpler.
I modify the data array and set the table model data again to the same
array.


dperez wrote:
    
Hi,

I've seen that the TableModel class has methods for changing existing
data, but what about adding new items and removing existing ones?

I have tried to modify directly the array of data, but the table gets
confused.

Thanks in advance for any help.

Regards,
David

      
    

  

Index: SimpleTableModel.js
===================================================================
--- SimpleTableModel.js (revision 3857)
+++ SimpleTableModel.js (working copy)
@@ -181,7 +181,10 @@
 
   // Inform the listeners
   if (this.hasEventListeners(qx.ui.table.TableModel.EVENT_TYPE_DATA_CHANGED)) {
-    var data = { firstRow:0, lastRow:rowArr.length - 1, firstColumn:0, 
lastColumn:rowArr[0].length }
+               var lastColumn = rowArr[0] ? rowArr[0].length : 0;
+               var lastRow = rowArr.length ? rowArr.length - 1: 0;
+               
+    var data = { firstRow:0, lastRow: lastRow, firstColumn:0, lastColumn: 
lastColumn };
     this.dispatchEvent(new 
qx.event.type.DataEvent(qx.ui.table.TableModel.EVENT_TYPE_DATA_CHANGED, data), 
true);
   }
 
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to