It worked!

Thank you Jim. 


Jim Hunter wrote:
> 
> Don't pass in null if there is no data, pass in an empty array.
> this.getTable().getTableModel().setDataAsMapArray([]);
> 
> that will clear the data.
> 
> Jim
> 
> 
> 
> On Fri, Jun 26, 2009 at 10:09 AM, Kanugula
> <[email protected]>wrote:
> 
>>
>> Hi there,
>>
>> qooxdoo 0.7.3
>> IE 6, FF3
>>
>> I have the following code for a qx.ui.table.model.Simple implementation.
>>
>> this.getTable().getTableModel().setDataAsMapArray(result); //result is
>> null
>> in case of no data.
>>
>> I refresh the data using a qooxdoo button which calls the above code.
>>
>> Whenever there is no data, I still see the old data.
>>
>> Do you know why?
>>
>> <code>
>>    _loadData : function()
>>    {
>>        var rpc = new
>> qx.io.remote.Rpc(this.getTable().getTableModel().getServiceUrl(),
>> this.getRpcService());
>>
>>        this.info ('Loading row data');
>>        that = this;
>>
>>        var _handler = function(result, exc) {
>>                if (exc == null) {
>>                    if (result != null) {
>>
>>  that.getTable().getTableModel().setDataAsMapArray(result);
>>                    }
>>                    else
>>                    {
>>
>>  that.getTable().getTableModel().setDataAsMapArray(result); //this
>> doesn't work
>>                                 //do some more
>>                    }
>>                }
>>                else
>>                {
>>                        that.info("Exception from the server: "+exc);
>>                }
>>        };
>>        rpc.callAsync(_handler, myMethod, mydata);
>>                        }
>> </code>
>>
>> Thanks.
>> Kanugula.
>> --
>> View this message in context:
>> http://www.nabble.com/Unable-to-clear-data-from-Simple-Table-tp24223840p24223840.html
>> Sent from the qooxdoo-devel mailing list archive at Nabble.com.
>>
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
> 
> ------------------------------------------------------------------------------
> 
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Unable-to-clear-data-from-Simple-Table-tp24223840p24225941.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to