SOURCE CODE: Widget Visual Samplers

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
  <title>Widget Visual Samplers | JavaScript Examples | UIZE JavaScript Framework</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="keywords" content="widget Uize.Widgets.VisualSampler.Widget"/>
  <meta name="description" content="See the visual samplers for one or more widget classes that implement visual samplers. Use this page to visually browse and discover available widgets."/>
  <link rel="alternate" type="application/rss+xml" title="UIZE JavaScript Framework - Latest News" href=""/>
  <link rel="stylesheet" href="../css/page.css"/>
  <link rel="stylesheet" href="../css/page.example.css"/>


<script type="text/javascript" src="../js/Uize.js"></script>

<h1 class="header">
  <a id="page-homeLink" href="../index.html" title="UIZE JavaScript Framework home"></a>
  <a href="../index.html" class="homeLinkText" title="UIZE JavaScript Framework home">UIZE JavaScript Framework</a>

<div class="main">
  <h1 class="document-title">
    <a href="../javascript-examples.html" class="breadcrumb breadcrumbWithArrow">JAVASCRIPT EXAMPLES</a>
    Widget Visual Samplers
    <div class="pageActionsShell">
      <div id="page-actions" class="pageActions"><a href="source-code/widget-visual-samplers.html" class="buttonLink">SOURCE</a></div>

  <!-- explanation copy -->

  <div class="explanation">
    <p>This example lets you view all the available widget visual samplers under a specific namespace. Simply select a namespace from the dropdown menu (only namespaces under which there are widget visual samplers will be listed in this menu). Upon selecting a namespace, all the widget visual samplers under that namespace will be generated in the page. From any of the widget visual samplers, you will be able to navigate to the corresponding widget class' reference documentation.</p>

  <div id="page-widgetViewer"></div>

<script type="text/javascript">

Uize.require (
  function () {
    'use strict';

    /*** create the example page widget ***/
      var _page = = UizeSite.Page.Example ();

    /*** add the visual samplers viewer ***/
      var _modulesTree = Uize.copy (UizeSite.ModulesTree ());
      delete _modulesTree.Uize.Build;

      _page.addChild (
          modules:Uize.Data.PathsTree.toList (_modulesTree),
          value:Uize.Url.fromParams (location.href).namespace || 'Uize.Widgets',

    /*** wire up the page widget ***/
      _page.wireUi ();