Hello,
I am displaying data in a qooxdoo table and there is a column that
contains IDs from a database. However, the ids come back as numbers so
qooxdoo "intelligently" adds thousands separators (commas) which
obviously does not make sense for IDs. (e.g. member_id = 12,091)
The code that does that is in table/cellrenderer/Default.js where it
checks if (typeof value == "number"):
My quick fix for this was to set cellrenderer.Number() for the column,
but that had some slight side-effects such as the right aligning the
values by default and simply having number semantics in principle. :)
Then I tried cellrenderer.String(), but that gave was worse since all my
values were now blank. I checked the code and I figured (and confirmed)
it was the escape function causing this (that's all this renderer does
anyway, right?) Pertinent code in String.js:
return qx.bom.String.escape(cellInfo.value || "");
So two things here:
1) Is there a way to set groupingUsed to false on cellrenderer.Default?
2) Should the escape function handle numbers by "converting" them to a
string? I would expect a String cellrenderer to render anything it gets
as, well, a string. Numbers, dates, etc., wouldn't you agree?
So, this seems to work for me at least:
escape : function(str) {
return qx.util.StringEscape.escape(str+"",
qx.bom.String.FROM_CHARCODE);
},
(line 362 in /framework/source/class/qx/bom/String.js)
If there's a better way, please let me know. I am not a JavaScript
programmer.
--
Felipe
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel