Usage of qx:table - tableColumnModel

32 views
Skip to first unread message

Oliver Friedrich

unread,
Apr 29, 2010, 4:54:05 PM4/29/10
to QxTransformer Mailing List
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('Key')"/>
> <qx:tableColumn label="{js}this.tr('Value')" width="2*"/>
> </qx:table>


TIA,
Oliver

--
You received this message because you are subscribed to the Google Groups "QxTransformer" group.
To post to this group, send email to qxtran...@googlegroups.com.
To unsubscribe from this group, send email to qxtransforme...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/qxtransformer?hl=en.

Christian Boulanger

unread,
Apr 30, 2010, 4:25:22 AM4/30/10
to qxtran...@googlegroups.com
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>

Siarhei Barysiuk

unread,
Apr 30, 2010, 9:01:09 AM4/30/10
to qxtran...@googlegroups.com
What if you try:

tableColumnModel="{js}qx.ui.table.columnmodel.Resize"

Let me know how it goes.

Serge

Oliver Friedrich

unread,
Apr 30, 2010, 9:27:32 AM4/30/10
to qxtran...@googlegroups.com

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')"

Siarhei Barysiuk

unread,
Apr 30, 2010, 10:02:23 AM4/30/10
to qxtran...@googlegroups.com
I found the problem and will fix it in a few minutes.

Serge

Siarhei Barysiuk

unread,
Apr 30, 2010, 10:11:31 AM4/30/10
to qxtran...@googlegroups.com
Fixed, please update your copy. Let me know if the problem still exists.

Serge
On Apr 30, 2010, at 4:27 PM, Oliver Friedrich wrote:

>

Oliver Friedrich

unread,
Apr 30, 2010, 10:54:30 AM4/30/10
to qxtran...@googlegroups.com
Hi Serge,

hmm, don't know, if your changes work. After updating of Qxt the Qcl
tags aren't recognised anymore.

I have cleaned my contrib dir and are downloading all libs again. Will
see, if this works ...
>> qxtransforme...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/qxtransformer?hl=en.
>>
>

--
Oliver Friedrich

Hammerschmidtstr. 39 | oli...@familie-friedrich.de
50999 Köln-Sürth | http://familie-friedrich.de
fon +49.(0)2236.5093052 | Skype: o.friedrich
fax +49.(0)2264.286479 | ICQ: 33857371

Secure Mail via PGP Signing & Encryption (Info: www.gnupg.org)
PGP ID: 0x5FBEE7EC

Siarhei Barysiuk

unread,
Apr 30, 2010, 10:57:20 AM4/30/10
to qxtran...@googlegroups.com
Please update once again, I've added qcl reference in dialect.json.
Sorry, my fault.

Serge

Christian Boulanger

unread,
Apr 30, 2010, 10:58:03 AM4/30/10
to qxtran...@googlegroups.com
Hi Oliver,

using the contrib:// way of using Qxt is very time-consuming if you want to use a  changing trunk. I suggest you checkout the SVN directly somwhere in your filesystem and then link to it in your config.json ...

Cheers,

Christian 

2010/4/30 Oliver Friedrich <oli...@familie-friedrich.de>

Christian Boulanger

unread,
Apr 30, 2010, 11:04:38 AM4/30/10
to qxtran...@googlegroups.com
For example I check out the qxt trunk to

/Users/bibliograph/Sites/Bibliograph/qooxdoo-contrib/QxTransformer

using 


and then put into config.json

    "QXTRANSFORMER_PATH": "/Users/bibliograph/Sites/Bibliograph/qooxdoo-contrib/QxTransformer/trunk/tool"

This way, you can quickly update to the newest trunk.

Of course, this shouldn't be the normal case, but since you are making useful suggestions that we can implement, it should be a better way until we have a release.

C. 




2010/4/30 Christian Boulanger <c.bou...@qxtransformer.org>

Oliver Friedrich

unread,
Apr 30, 2010, 11:17:39 AM4/30/10
to qxtran...@googlegroups.com
Hi Serge & Christian,
have made a svn checkout of Qxt and will use this version now.

The Qcl tags are working again.

Cheers,
Oliver



Am 30.04.2010 17:04, schrieb Christian Boulanger:
> For example I check out the qxt trunk to
>
> /Users/bibliograph/Sites/Bibliograph/qooxdoo-contrib/QxTransformer
>
> using
>
> svn co
> https://qooxdoo-contrib.svn.sourceforge.net/svnroot/qooxdoo-contrib/trunk/qooxdoo-contrib/QxTransformer
>
> and then put into config.json
>
> "QXTRANSFORMER_PATH":
> "/Users/bibliograph/Sites/Bibliograph/qooxdoo-contrib/QxTransformer/trunk/tool"
>
> This way, you can quickly update to the newest trunk.
>
> Of course, this shouldn't be the normal case, but since you are making
> useful suggestions that we can implement, it should be a better way
> until we have a release.
>
> C.
>
>
>
>
> 2010/4/30 Christian Boulanger <c.bou...@qxtransformer.org
> <mailto:c.bou...@qxtransformer.org>>
>
> Hi Oliver,
>
> using the contrib:// way of using Qxt is very time-consuming if you
> want to use a changing trunk. I suggest you checkout the SVN
> directly somwhere in your filesystem and then link to it in your
> config.json ...
>
> Cheers,
>
> Christian
>
> 2010/4/30 Oliver Friedrich <oli...@familie-friedrich.de
> <mailto:oli...@familie-friedrich.de>>
> >>>> <mailto:oli...@familie-friedrich.de
> <mailto:qxtran...@googlegroups.com>.
> >> To unsubscribe from this group, send email to
> >> qxtransforme...@googlegroups.com
> <mailto:qxtransformer%2Bunsu...@googlegroups.com>.
> >> For more options, visit this group at
> >> http://groups.google.com/group/qxtransformer?hl=en.
> >>
> >
>
> --
> Oliver Friedrich
>
> Hammerschmidtstr. 39 | oli...@familie-friedrich.de
> <mailto:oli...@familie-friedrich.de>
> 50999 Köln-Sürth | http://familie-friedrich.de
> fon +49.(0)2236.5093052 | Skype: o.friedrich
> fax +49.(0)2264.286479 | ICQ: 33857371
>
> Secure Mail via PGP Signing & Encryption (Info: www.gnupg.org
> <http://www.gnupg.org>)
> PGP ID: 0x5FBEE7EC
>
> --
> You received this message because you are subscribed to the
> Google Groups "QxTransformer" group.
> To post to this group, send email to
> qxtran...@googlegroups.com
> <mailto:qxtran...@googlegroups.com>.
> To unsubscribe from this group, send email to
> qxtransforme...@googlegroups.com
> <mailto:qxtransformer%2Bunsu...@googlegroups.com>.

Oliver Friedrich

unread,
May 3, 2010, 4:35:02 AM5/3/10
to qxtran...@googlegroups.com
Hi Serge,

This was the first time a could test your changes. Something is wrong
now. There is the tablemodel missing (or better: "null") in the
constructor for the tables. Qxt generates now this for example:

> var tblTasks = new qx.ui.table.Table( null , {
> tableColumnModel:function(obj) { return new qx.ui.table.columnmodel.Resize(obj);}
> });

As a result i get an error, that the table columns are not available for
setting the column width.

But the array with qx.ui.table.columnmodel.Resize(obj) should be ok now.

Cheers,
Oliver


Am 30.04.2010 16:11, schrieb Siarhei Barysiuk:
>> qxtransforme...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/qxtransformer?hl=en.
>>
>

--
Oliver Friedrich

Hammerschmidtstr. 39 | oli...@familie-friedrich.de
50999 Köln-Sürth | http://familie-friedrich.de
fon +49.(0)2236.5093052 | Skype: o.friedrich
fax +49.(0)2264.286479 | ICQ: 33857371

Secure Mail via PGP Signing & Encryption (Info: www.gnupg.org)
PGP ID: 0x5FBEE7EC

Siarhei Barysiuk

unread,
May 3, 2010, 4:42:23 AM5/3/10
to qxtran...@googlegroups.com
Hi Oliver,

Please use following structure:

<qx:table id="week1Table">
<qx:tableModel class="qx.ui.table.model.Simple"/>
...
</qx:table>

I'm still working on this and improving...

Serge

Oliver Friedrich

unread,
May 3, 2010, 5:11:59 AM5/3/10
to qxtran...@googlegroups.com
Hi Serge,
thanks, this works.


Cheers,
Oliver
Reply all
Reply to author
Forward
0 new messages