:: Forum >>

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

This is the correct code -

table.setAsync(false);

Did it work ok without this line?
Alex (ActiveWidgets)
Friday, January 30, 2009
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
Monday, February 2, 2009
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)
Monday, February 2, 2009
Alex, thank you very much for the hint. It's ok now, but I don't understand the rationale behind this behaviour.
Gianni Luppi
Tuesday, February 3, 2009
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)
Tuesday, February 3, 2009

This topic is archived.


Back to support forum

Forum search