Dear Mustafa and Daniel,

Thank you for your kind help. I learned that Perl should numify the data
before forwarding it to JSON. So, I had to add "+0" for all integers in my
Perl scripts. Now sorting works properly.

Best regards, Zoltan

2010/10/14 Mustafa Sak <[email protected]>

> Hi Zoltan,
>
> Did you check your response? Dou you really get numbers back? Often the
> values are send as string back.
>
> By the way: callSync is blocking your app til response, so may be its
> better
> to use callAsync. And for more complex dialogs with your webserver try RPC
> distributions. http://qooxdoo.org/documentation/1.1 Section Communication
>
> Ragrds Sak
>
>
>
> SAKsystems
>
> Inh. Mustafa Sak
>
> Varrelmannstr. 16
>
> 30453 Hannover
>
> Tel.   +49 511 / 165 969 40
>
> Fax   +49 511 / 165 969 49
>
> Mobil +49 163 / 312 6144
>
> http://www.saksys.de
>
> [email protected]
>
> STEUER-Nr. 2613817458
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Daniel Wagner [mailto:[email protected]]
> Gesendet: Donnerstag, 14. Oktober 2010 09:11
> An: qooxdoo Development
> Betreff: Re: [qooxdoo-devel] number type column cannot be sorted properly
>
> Hi Zoltán,
>
> welcome to the list and thanks for the kind words. :)
>
> I'm not an expert on the table widget, but I'd expect it to consider the
> column's data type when sorting. Could you please open a report for this
> in our bug tracking system (http://bugzilla.qooxdoo.org/)?
>
>
> Regards,
> Daniel
>
> Kovács Zoltán schrieb:
> > Dear Developers,
> >
> > First of all, congratulations to the amazing Qooxdoo system. I started
> > to develop an application by using it.
> >
> > I would like to sort number-type columns in a table widget. But
> > unfortunately the numbers behave like strings.
> >
> > My code is as follows:
> >
> > ...
> > __table : function() {
> >
> > this.tableModel = new qx.ui.table.model.Simple();
> >
> > this.tableModel.setColumns([ this.tr <http://this.tr>("ID"), this.tr
> > <http://this.tr>("Kiadvány"), this.tr <http://this.tr>("Szerzo"),
> > this.tr <http://this.tr>("Megjegyzés"), this.tr
> > <http://this.tr>("ISBN"), this.tr <http://this.tr>("Ár"),
> > this.tr <http://this.tr>("Kiadás éve"),
> > this.tr <http://this.tr>("Szempontok")],
> >
> ["id","name","author","comment","code","price","release_year","property"]);
> >
> > this.table = new qx.ui.table.Table(this.tableModel);
> >
> > this.table.getTableColumnModel().setDataCellRenderer(0, new
> > qx.ui.table.cellrenderer.Number());
> > this.table.getTableColumnModel().setDataCellRenderer(5, new
> > qx.ui.table.cellrenderer.Number());
> > this.table.getTableColumnModel().setDataCellRenderer(6, new
> > qx.ui.table.cellrenderer.Number());
> >
> > this.table.set({
> > decorator : null,
> > statusBarVisible : false
> > });
> >
> > this.table.setColumnWidth(0,35);
> > this.table.setColumnWidth(1,200);
> > this.table.setColumnWidth(2,125);
> > this.table.setColumnWidth(3,125);
> > this.table.setColumnWidth(4,100);
> > this.table.setColumnWidth(5,50);
> > this.table.setColumnWidth(6,50);
> >
> >
>
> this.table.getSelectionModel().setSelectionMode(qx.ui.table.selection.Model.
> SINGLE_SELECTION);
> >
> > return this.table;
> > },
> >
> > loadTable : function() {
> > var APP = qx.core.Init.getApplication();
> >
> >
>
> APP.client.callSync('productManagement','getList',[],qx.lang.Function.bind(t
> his.__updateTable,this));
> >
> > },
> >
> > __updateTable : function(resp) {
> > this.tableModel.setData(resp,false);
> > }
> >
> > ...
> >
> > I learned that I must use the following technique to define a column to
> > be shown as numbers:
> >
> > this.table.getTableColumnModel().setDataCellRenderer(0, new
> > qx.ui.table.cellrenderer.Number());
> >
> > It works, however, sorting as numbers does not seem to be automatic. If
> > it is not compulsory, I don't want to write compare functions here. Or
> > am I missing something here?
> >
> > I also checked the demo example
> > at http://demo.qooxdoo.org/1.2.1/demobrowser/#table~Table.html.
> > Unfortunately, the example JS code seems to show a different approach
> > (because I must fill the table using a remote database using an AJAX
> call).
> >
> > Thank you for your kind help in advance.
> >
> > Best regards,
> > Zoltan Kovacs
> >
> >
> > ------------------------------------------------------------------------
> >
> >
>
> ----------------------------------------------------------------------------
> --
> > Beautiful is writing same markup. Internet Explorer 9 supports
> > standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> > Spend less time writing and  rewriting code and more time creating great
> > experiences on the web. Be a part of the beta today.
> > http://p.sf.net/sfu/beautyoftheweb
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > qooxdoo-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
> ----------------------------------------------------------------------------
> --
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to