Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I tested out this code and everything seemed to work for me. Are you sure you're setting up the subNavConfig variable properly? </p> <p>Here's the client code I used:</p> <pre><code>// Test.mxml &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="onInit()" xmlns:ns="comp.*"&gt; &lt;mx:Script&gt; &lt;![CDATA[ import mx.collections.XMLListCollection; [Bindable] public var bookCollection:XMLListCollection; public function onInit():void { var books:XML = &lt;books&gt; &lt;book publisher="Addison-Wesley" name="Design Patterns" /&gt; &lt;book publisher="Addison-Wesley" name="The Pragmatic Programmer" /&gt; &lt;book publisher="Addison-Wesley" name="Test Driven Development" /&gt; &lt;book publisher="Addison-Wesley" name="Refactoring to Patterns" /&gt; &lt;book publisher="O'Reilly Media" name="The Cathedral &amp; the Bazaar" /&gt; &lt;book publisher="O'Reilly Media" name="Unit Test Frameworks" /&gt; &lt;/books&gt;; var booklist:XMLList = books.book; bookCollection = new XMLListCollection(booklist); } ]]&gt; &lt;/mx:Script&gt; &lt;ns:SubNavBar id="fb" menuItems="{bookCollection}"/&gt; &lt;/mx:Application&gt; </code></pre> <p>And here's the output I got:</p> <pre><code>SubNav: config = &lt;book publisher="Addison-Wesley" name="Design Patterns"/&gt; &lt;book publisher="Addison-Wesley" name="The Pragmatic Programmer"/&gt; &lt;book publisher="Addison-Wesley" name="Test Driven Development"/&gt; &lt;book publisher="Addison-Wesley" name="Refactoring to Patterns"/&gt; &lt;book publisher="O'Reilly Media" name="The Cathedral &amp;amp; the Bazaar"/&gt; &lt;book publisher="O'Reilly Media" name="Unit Test Frameworks"/&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload