On Friday 08 January 2010 10:49:09 Qoodary wrote:
> In the meantime I read a lot of examples in the mailing list.
>
> Now I can see someting in the table, but only in the first row!
> and also the output is with all content like [ { and also the
> mysql database column names:
> Example of alert(content);
> [{"AddressField1":"guest","AddressField2":"[email protected]","AddressField3"
> :"21400","AddressField4":"Marketing","AddressField5":"40655"},{"AddressFiel
> d1":"demo1","AddressField2":"[email protected]","AddressField3":"21400","Addre
> ssField4":"Development","AddressField5":"334455"},
> So I guess I have to filter the JSON output?
The table model need the data in a multi-dimensional array, so you have to
transform the incoming JSON data.
--snip--
[
[ columnData1, columnData2, columnData3, columnData4 ],
[ columnData1, columnData2, columnData3, columnData4 ],
[ columnData1, columnData2, columnData3, columnData4 ]
]
--snip--
> But if I use
> var tabledata = qx.io.Json.parseQx(content);
> I receive an error.
Which qx release you are developing against? With the 1.0 release the
"parseQx" method is deprecated and replaced by the "parse" method.
Anyway, to parse a JSON string it need to have a key. So your data receiving
from the server has to look like
--snip--
data = [ {"AddressField1":"guest", //more elements to come } ],
--snip---
Which errror do you receive?
> Also if I use qx.util.Mime.JSON instead of "text/plain" I receive
> "undefined Mime" ?
I guess this has to do with the wrong data (the missing key).
> Next questions is, how can I split the output so that it is show in all
> columns of the table?
Just use the right input structure for the model as mentioned above. This
should do the trick.
cheers,
Alex
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel