3.2.0

message template

Alex,

can you provide a little bit more information about what this template is for?
Jeremie
February 20,
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)
February 20,
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
February 26,
Alex, can you show me how I can use this template?
Jeremie
March 4,
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)
March 4,
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)
September 13,

This topic is archived.

See also:


Back to support forum