Hello,
I've corrected the JSON server output as Jim noticed.
what I need is to use the "fields" array to set column names automatically
(taht's why there's a comment Derrel) and "values" array of arrays to set
the table data rows.
I didn't get any error, but things don't work as expected, I don't know how
to extract "fields" from json result and set it as column titles. Also, I
don't know how to set the data ("values" array of arrays).
Regards,
Derrell Lipman wrote:
>
> On Fri, Feb 11, 2011 at 15:52, Jim Hunter <[email protected]> wrote:
>> And if this really is the data you are getting from the server then it
>> won't work like you want. You only have 2 single arrays here. The
>> values needs to be an array or arrays. The data should look like this
>> in order to get 3 rows of data:
>>
>> {
>> "fields": ["id","name","age"],
>> "values": [[1,"xxx",21],
>> [2,"yyy",22],
>> [3,"zzz",23]]
>> }
>
> I hadn't noticed that. Jim is right, of course. And then, in the
> handler, you don't want to be passing the variable 'results' to
> table.setData(). Instead, you want to pass results.values since only
> the array of arrays is the table data. The fields were set when you
> created the table model.
>
> Derrell
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/RPC-JSON-Server-First-test-tp6016136p6017211.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel