Hmm, that doesn't work...
the result becomes:
> var tblCustomFields = new qx.ui.table.Table(
> tblCustomFields_tableModel, { tableColumnModel:new
> {js}qx.ui.table.columnmodel.Resize});
If i try it without the "{js}" i get the following error from qoxxdoo:
> 005004 Assertion error! Invalid incoming value for property
> 'newTableColumnModel' of class 'qx.ui.table.Table': Expected value to
> be typeof function but found qx.ui.table.columnmodel.Resize[1309]!
> file:///home/oliver/Downloads/RIAs/qooxdoo-1.1-sdk/framework/source/class/qx/ui/form/DateField.js
> Line 219
I don't know why the error occurs in "DateField", but who cares :)
I think it happens because an object of type DateField tries to resize
itself with the provided handler of the tablecolumn.
A correct example would be the following (just a seperate variable for
better linebreak):
> var custom = {tableColumnModel: function(obj){
> return new qx.ui.table.columnmodel.Resize(obj);
> };
> var tblCustomFields = new qx.ui.table.Table(
> tblCustomFields_tableModel,
> custom);
Hope this helps.
Cheers,
Oliver
Am 30.04.2010 15:01, schrieb Siarhei Barysiuk:
> What if you try:
>
> tableColumnModel="{js}qx.ui.table.columnmodel.Resize"
>
> Let me know how it goes.
>
> Serge
>
>
>
> On Apr 30, 2010, at 11:25 AM, Christian Boulanger wrote:
>
>> Hello Oliver,
>>
>> support for the table is still somewhat underdeveloped, but Serge
>> is working on that currently. As I am working with
>> programmatically created tables currently, I don't have a code
>> snippet available. Serge, do you have news?
>>
>> C.
>>
>> 2010/4/29 Oliver Friedrich <
oli...@familie-friedrich.de
>> <mailto:
oli...@familie-friedrich.de>>
>>
>> Hi Serge & Christian, what is the right usage of the attribute
>> "tableColumnModel" in qx:table?
>>
>> I want to use qx.ui.table.columnmodel.Resize as the column model.
>> But if i insert the class directly i get an javascript error, that
>> a function is expected. But if i use a method from my parent class
>> i get the error, that it is not defined.
>>
>> Here my table:
>>
>>> <qx:table id="tblCustomFields" height="200"
>>> tableModel="qx.ui.table.model.Simple" tableColumnModel="???"
>>> qxt:row="1" qxt:column="0"> <qx:tableColumn label="{js}
this.tr
>>> <
http://this.tr>('Key')"/> <qx:tableColumn label="{js}
this.tr
>>> <
http://this.tr>('Value')"