:: Forum >>

message template

Alex,

can you provide a little bit more information about what this template is for?
Jeremie
Friday, February 20, 2004
The message template is shown instead of the grid data section when the data model is "not ready", i.e. loading. I am planning to put progress indicator and/or error message there.
Alex (ActiveWidgets)
Friday, February 20, 2004
Can you give a sample on how I can use this template? For example, when I receive XML from the server, sometimes it contains error information instead of actual data which I would like to display.
Jeremie
Thursday, February 26, 2004
Alex, can you show me how I can use this template?
Jeremie
Thursday, March 4, 2004
If you want to put some message while the data is loading, you can do it this way:

var msg = new Active.HTML.DIV;
msg.setContent("text", "Loading data, please wait");
obj.setTemplate("message", msg);

The grid (more precisely data template) checks first if the data model isReady() method returns true, if not then a message template is printed instead of data rows.

To display an error message you need to overload isReady() method, because in the current implementation it will always switch to true when HTTP response is received (even with error code).
Alex (ActiveWidgets)
Thursday, March 4, 2004
Alex, please:

Where I must write the next code:

var msg = new Active.HTML.DIV;
msg.setContent("text", "Loading data, please wait");
obj.setTemplate("message", msg);


Thanks
Sergio (Spain)
Tuesday, September 13, 2005

This topic is archived.


Back to support forum

Forum search