On Wed, Dec 28, 2011 at 16:28, Scott Chapman <[email protected]> wrote:
> I've got the table showing up but the values are not showing up. I'm
> fetching data via json and trying to put it in a table.
>
> var __tableModel = new qx.ui.table.model.Simple();
> __tableModel.setColumns([ "Date", "DelayAvg", "First", "Last" ]);
>
> var url = "/avg_checkin_times/" + label;
> var jsonFetcher = new qx.data.store.Json(null);
> jsonFetcher.addListener("loaded", function() {
> console.log(jsonFetcher.getModel().toArray());
> __tableModel.setData(jsonFetcher.getModel());
> }, this);
> jsonFetcher.setUrl(url);
>
The "loaded" event from a qx.data.store.Json object is of
type "qx.event.type.Data". That event type has a "data" property which
contains the event data. I'm not sure what format the model is returned in,
but I'd expect you to be able to do this:
jsonFetcher.addListener(
"loaded",
function(e)
{
__tableModel.setData(e.getData());
},
this);
Derrell
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel