3.0.5

blank table after asynchronous request

In file examples\grid data - xml\basic.htm after the line

table.setURL("basic1.xml");

I added the following line, expecting the results didn't change

table.setAsync(false);

but the table remains blank, except for headings.

The same things happens if the URL is set to a jsp serving xml data and not a static file.

What else should be changed in order to have a synchronous request working?

Just figuring out how AW works....

Thanks
Gianni Luppi
January 29,
Sorry: the title should have been "blank table after SYNCHRONOUS request"
Gianni Luppi
January 29,
http://www.activewidgets.com/aw.http.request/async.html
January 29,
Thanks for posting the address that's already linked in the documentation section of this site. This is veeery helpful. :-p
Gianni Luppi
January 30,
Gianni,

This is the correct code -

table.setAsync(false);

Did it work ok without this line?
Alex (ActiveWidgets)
January 30,
Hi Alex,

yes, the example basic.htm works ok in async mode but when I add the line (async = false), no data is shown.

Why? From an end user point of view, shouldn't I obtain the same final result?

Did anyone else try to do the same thing I did?

Thanks
Gianni Luppi
February 2,
Ok, the problem in this example is that table.request() method is called before creating the grid (assuming the async data request will return data after some delay). To fix it move table.request() just after obj.setCellModel(table) line -

...
obj.setCellModel(table);
table.request();
document.write(obj);
Alex (ActiveWidgets)
February 2,
Alex, thank you very much for the hint. It's ok now, but I don't understand the rationale behind this behaviour.
Gianni Luppi
February 3,
The grid is updated when data response arrives, so if the data source is not yet attached to the grid, the grid will not be updated.
Alex (ActiveWidgets)
February 3,

This topic is archived.

See also:


Back to support forum