On Friday 08 January 2010 12:25:32 Qoodary wrote: > I have changed from "text/plain" to > "application/json" > > Now I get back an object which I think it is correct? Yes, if the JSON is parsed correctly a javascript object is the result.
> But the question is why qx.util.Mime.JSON is not working like it is shown > in the examples. Which examples? Can you please post a link? Maybe they are outdated and need a correction. > <<<The table model need the data in a multi-dimensional array, so you have > to > transform the incoming JSON data. > The data from database comes in a multi-dimensional array. > > <<<Which qx release you are developing against? With the 1.0 release the > "parseQx" method is deprecated and replaced by the "parse" method. > > I use version 1.0. But I also tried it with > var tabledata = qx.io.Json.parse(content); > In the moment I do not use it because I read it is not neccessary to parse? Referring to the API documentation the "setData" method of the table model class (qx.ui.table.model.Simple, I assume) takes a multi-dimensional array as first parameter. If you send JSON data over the wire and use the mime type "application/json" the incoming result is automatically parsed and you get a javascript object as result of your request. So no further parsing is necessary. It would be interesting what the output of your content looks like. Can you please post it here? > Now the table shows in the status bar 14 rows which is correct to the > entries in the mysql database. > But The rows and columns are empty. > How can I "split" the JSON content? It seems that the value you are using as input is not quite a multi- dimensional array. Please post it here so we can take a look. 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
