title: CQ5 - Dynamically populating options in selection xtype
body: <p>I've been banging my head for hours on this now. I'm trying to dynamically populate options in a selection xtype and can't get it to work. Here is my dialog.xml</p>
  
  <pre><code>&lt;resourceType
              jcr:primaryType="cq:Panel"
              title="Header Type"&gt;
              &lt;items jcr:primaryType="cq:WidgetCollection"&gt;
                  &lt;headerType
                          jcr:primaryType="cq:Widget"
                          fieldLabel="Header Type"
                          name="./headerType"
                          type="select"
                          xtype="selection"&gt;
                      &lt;options jcr:primaryType="cq:WidgetCollection"&gt;
                          &lt;categories
                              jcr:primaryType="cq:Widget"
                              path="/content/admin/adminView/jcr:content/header-admin-content/cats/type.infinity.json"
                              width="500"
                              xtype="cqinclude" /&gt;
                      &lt;/options&gt;
                  &lt;/headerType&gt;
              &lt;/items&gt;
          &lt;/resourceType&gt;
  </code></pre>
  
  <p><strong>The json that I'm producing for:</strong></p>
  
  <pre><code>content/admin/adminView/jcr:content/header-admin-content/cats/type.infinity.json
  </code></pre>
  
  <p><strong>Looks something like this:</strong></p>
  
  <pre><code>{"jcr:primaryType":"nt:unstructured","item_1":  
  {"jcr:primaryType":"nt:unstructured","text":"small","parameter":"small"},"item_2":
  {"jcr:primaryType":"nt:unstructured","text":"medium","parameter":"medium"},"item_3":
  {"jcr:primaryType":"nt:unstructured","text":"large","parameter":"large"},"item_4":
  {"jcr:primaryType":"nt:unstructured","text":"none","parameter":"none"}} 
  </code></pre>
  
  <p>When I go to open the dialog nothing happens I just get a JS error <strong>TypeError: snippet.xtype is undefined</strong></p>
  
  <p>Any help is appreciated!</p>