Am 04.05.2010 22:05, schrieb Nick Watkins:
> I think I need help from someone with intimate knowledge of the table widget.
> I started having problems as soon as I upgraded from 1.0.1 to 1.1. I'm sure
> it's something I'm doing wrong, or supposed to be doing a different way.
>
> Here's a basic rundown: our application uses the table widget to display
> detailed information about members from our database. We track maybe 40 - 50
> different variables about each member, and different clients using the
> application will have different needs with what data is visible in the
> table.
>
> So we're not bugging the server to give us a huge amount of data when we're
> only viewing maybe 10 columns at once, we just fetch what columns we need
> according to preferences handled in the backend. If the user wants to
> add/remove columns, they open a dialog, check which ones they want, and hit
> the submit button. This method gets called to "refresh" the table:
>
> reloadTable : function() {
>       // clear the table model's row cache
>       this.__table.getTableModel().clearCache();
>       
>       // delete the existing table model and table
>       this._disposeObjects("__tableModel, "__table");
>                       
>       // create table and model from scratch
>       this.__tableModel = new controlcenter.Model.List.TableModel();
>       this.__tableModel.addListener("metaDataLoaded", this.__createTable, 
> this);
> }
>
> This worked fine with 1.0.1. The table blinked out of existence, fetched the
> new columns (firing the "metaDataLoaded" event when done), at which point
> the createTable method would be called, which doesn't do anything fancy;
> just creates a table and adds it to the container.
>
> In 1.1, however, I get this error:
> "TypeError: Result of expression 'container' [null] is not an object." in
> Widjet.js, line 1038
>
> > From what I can gather, the error has something to do with rendering the new
> table when it is created in the __createTable method. Am I getting rid of
> the old table and model correctly? I can't imagine it has anything to do
> with the creation of the new table, or else the problem would surface when I
> first create it, not when I attempt to "refresh" it.
>    
Hi Nick,

it seems to me that your reloadTable method is correct. I have tried to 
reproduce your issue, but I have no success. Could you please post a 
short snippet to reproduce the issue?

Thanks,
Chris

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

Reply via email to