Search
ListContainer.fromObject Method
See Also
 






Loads items from a data object.

Namespace: MindFusion.Common.UI
File: ListContainer.js

 Syntax

JavaScript  Copy Code

function fromObject (data)

 Parameters

data

Object. The object containing the items data.

 Example

The following sample creates an instance of the Menu class, which derives from ListContainer and uses the fromObject method to load the menu items:

JavaScript  Copy Code

var menu = new ui.Menu(document.getElementById("links"));
   menu.theme = "blue";

   var data = [
       {
        title: "Activities",
        href: "Activities.html",
        items: [
              { title: "Shows how to create an activity timetable. \n" +
      "Planner, Charts, ListView, Virtual Keyboard", cssClass: "description"
              }]
       },
    {
     title: "Chat",
     href: "Chat.html",
     items: [
      { title: "A chat-like application. \n" +
      "WindowHost, ListView, ToolStrip, Tooltip", cssClass: "description"
      }]
    },
       {
        title: "DomInspector",
        href: "DomInspector.html",
        items: [
              { title: "Shows how to build a dynamic tree. \n" +
      "Diagram, TreeView, ListView, Tooltip", cssClass: "description"
              }]
       },
    {
     title: "FlipMatch",
     href: "FlipMatch.html",
     items: [
      { title: "The classic memory game. \n" +
      "Diagram, Dialogs, Gauges", cssClass: "description"
      }]
    },
       {
        title: "ServerLoad",
        href: "ServerLoad.html",
        items: [
              { title: "A sample server load web application. \n" +
      "Diagram, Gauges, Charts", cssClass: "description"
              }]
       },
    {
     title: "SimpleBrowser",
     href: "SimpleBrowser.html",
     items: [
      { title: "A TabControl based web browser application. \n" +
      "TabControl, ToolStrip", cssClass: "description"
      }]
    },
    {
     title: "TemperatureLog",
     href: "TemperatureLog.html",
     items: [
      { title: "A temperature data logger application. \n" +
      "Planner, Charts, Window, Gauges", cssClass: "description"
      }]
    }
    ];

   menu.fromObject(data);

 See Also