On Fri, Feb 11, 2011 at 15:00, slah <[email protected]> wrote:
>
> Hello,
>
> I'm using the Jean's trick but it doesn't seem to work, the table is empty,
> here's the code:

Actually, you're probably getting an error...

>
>      //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);

At this point, there is no variable tableModel variable that's
defined. Move your handler definition and the rpc.callAsync() call
down to the end of your program, and you may have better luck.

>          } 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" ]);

Why have you commented this out? You've provided no column definitions
for your table. You need that statement.

>
>      // table
>      var table = new qx.ui.table.Table(tableModel);

See, here you're passing that empty table model to the table, so it
thinks there are no columns.

>
>      table.setMetaColumnCounts([1, -1]);
>      var selectionMode =
> qx.ui.table.selection.Model.MULTIPLE_INTERVAL_SELECTION;
>      table.getSelectionModel().setSelectionMode(selectionMode);

Get rid of that stuff for the time being. For the purpose of getting
things working, you don't need meta columns nor selection model
changes.

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

Reply via email to