On Fri, May 3, 2013 at 7:50 AM, Defero <[email protected]> wrote:
> Hi,
>
> i'm a bit new with qooxdoo so if this question is rediculous i apologize.
>
> I've been playing with the Table and the RemoteTableModel.
> And i noticed if i wan't a Resize TableColumnModel i can only set it in the
> construstor via custom obj. Is there a way to change te TableColumnModel
> later on?
>
Unfortunately, there's not. Table is a very old widget, which does a
fabulous job at what it does, but there are some things that a rewritten
"version 2" would do differently. I think changing the column model at all
was not anticipated in the original design. I added the ability to provide
one's own table column model (and I added the Resize model), but too many
deep changes would be required to be able to alter the column model after
creation of the table. This is seen most dramatically in that once you
decide on a number of columns, you can't add or delete any.
The work-around is to create a new table with the new column model model,
and replace the old table with the new one in its layout.
> Then a found a function newTableColumnModel that didn't do anything really.
> The getNewTableColumnModel return a *string* of the function and the
> getTableColumnModel returned the old Basic TableColumnModel.
>
No, it doesn't return a string of the function, it returns the function
itself. If you print it, e.g., with console.log(), the function's
toString() method will be called, and (depending on the browser), will
print out the function as a string. It is, in fact, a function, though.
That function is called when the Table first needs to create the column
model. It is provided in the 'custom' member of the constructor of Table.
Once the constructor has returned, it's too late to change the column
model, so providing a function which will be called to retrieve a new
column model, as the 'tableColumnModel' member of the 'custom' object, is
the one and currently only supported way of setting a non-default column
model for the table.
Cheers,
Derrell
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel