Dashboard Component Examples

   PROIV Aurora Help

PROIV Aurora ships with a set of Dashboard component examples for you to progress through to help you develop your own components. They increase in complexity as you work through them, by extending and building on the functionality of the previous ones. Consequently, it is recommended that you look at them in order. Full explanations are included in the comments.

For example, the Hello World example contains the following comments:

dojo.provide("proiv.widgets.examples.HelloWorld");

dojo.require("dijit._Templated");

dojo.require("dijit.layout._LayoutWidget");

// a simple widget that displays Hello World

// as it's a dashboard component we need to make sure its a layout widget and templated

dojo.declare("proiv.widgets.examples.HelloWorld", [dijit.layout._LayoutWidget, dijit._Templated], {

  // this is how we specify the layout of the widget (starting from the bottom of the titlebar)

  templateString:

    "<div class=\"helloWorld\">" +

    "\t<div dojoAttachPoint=\"contentNode\" class=\"dijitContentPane\">Hello World</div>" +

    "</div>",

  // This fires after creation, but before the widget is rendered to the page.

  // At this time in the widget lifecycle, you have access to the widget’s nodes, so additional parsing,

  // connections, styling, or even attaching more widgets is possible.

  postCreate: function () {

    // add a ! to hello world by appending to the dojo attach point 'contentNode' defined in the

    // template string above.

    this.contentNode.innerHTML += "!";

  }

});

The files are in the .../aurora/proiv/widgets/examples folder.

It is recommended to work through the examples in the following order:

  1. Hello World

  2. Simple Button

  3. Multiple Button

  4. Configurable

  5. Simple Chart

  6. Task Data

  7. News Feed

  8. Yahoo News

Refer to the Maintain Components and Settings topics to learn more about adding components and displaying them on the Dashboard.


 

Comment on this topic

Topic ID: 810116