Hello,
I'm using the Jean's trick but it doesn't seem to work, the table is empty,
here's the code:
//rpc object
var rpc = new qx.io.remote.Rpc();
rpc.setTimeout(10000);
rpc.setCrossDomain(true);
rpc.setUrl("http://127.0.0.1:8080");
rpc.setServiceName("ADMIN");
// asynchronous call handler
var handler = function(result, exc) {
if (exc == null)
{ tableModel.setData(result);
} else
{
alert("Exception during async call: " + exc);
}
};
//async call
rpc.callAsync(handler, "TESTJSON");
// table model
var tableModel = new qx.ui.table.model.Simple();
// tableModel.setColumns([ "id", "name", "age" ]);
// table
var table = new qx.ui.table.Table(tableModel);
table.setMetaColumnCounts([1, -1]);
var selectionMode =
qx.ui.table.selection.Model.MULTIPLE_INTERVAL_SELECTION;
table.getSelectionModel().setSelectionMode(selectionMode);
Any help please?
Fritz Zaucker-2 wrote:
>
> Wouldn't he have to create the tablefirst using the "fields" as column
> names?
>
> Cheers,
> Fritz
>
> On Fri, 11 Feb 2011, Jean-Baptiste BRIAUD -- Novlog wrote:
>
>> Yes.
>> Fill the datamodel of the table with that javascript object and you're
>> done.
>>
>> On 11 févr. 2011, at 16:27, slah wrote:
>>
>>>
>>> Hello,
>>> I've developed a json-rpc server, I'm testing it,
>>> the server queries a database and returns results as json.
>>>
>>> I want to use it with qooxdoo,
>>>
>>>
>>> My question is: if the server returns a json string like this one:
>>>
>>> {
>>> "fields": ["id","name","age"],
>>> "values": [1,"xxx",21,
>>> 2,"yyy",22,
>>> 3,"zzz",23]
>>> }
>>>
>>> is it possible to create a qooxdoo table where id| name| age are column
>>> titles and
>>>
>>> 1| xxx| 21
>>> 2| yyy| 22
>>> 3| zzz| 23
>>>
>>> are rows.
>>>
>>> Best regards
>>> --
>>> View this message in context:
>>> http://qooxdoo.678.n2.nabble.com/RPC-JSON-Server-First-test-tp6016136p6016136.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
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>>
>>
>
> --
> Oetiker+Partner AG tel: +41 62 775 9903 (direct)
> Fritz Zaucker +41 62 775 9900 (switch board)
> Aarweg 15 +41 79 675 0630 (mobile)
> CH-4600 Olten fax: +41 62 775 9905
> Schweiz web: www.oetiker.ch
> ------------------------------------------------------------------------------
> 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-tp6016136p6017003.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