Atto Templated DataView Example

This page serves as an example of how to apply the Templatize mixin to the standard DataView widget.

Templatize allows you to specify a callback function to be called whenever dataView receives new data, allowing you to define a custom templating solution to the returned data structure. In this demo, I'm using Mustache.js to render an arbitrarily-sized list of person structs, but you could use any client-side templating package you want.

How many records to retrieve?

Requested data:

{{#people}}
  • Name: {{first_name}} {{surname}}
    Birthday: {{birthDate}}
    Personal identifier: {{randomString}}
  • {{/people}}