Incremental Loading of a Tree Component

I'm working on an explorer-type interface in Flex 2 for
browsing a remote file repository. It's a standard split-pane
affair with a directory tree on the left and a listing on the
right.
Because the entire directory tree can be rather large, I need
to load it incrementally as the user expands nodes rather than all
at once. I failed to find a relevant example so I wrote my own. It
works, but I'm new to Flex and am not sure if there's an easier way
or if there are any pitfalls to the way I did it.
I posted my code here:
http://xocoatl.blogspot.com/2007/01/incremental-loading-of-tree-in-flex-2.html
Any comments here or on the blog are appreciated; I'm
guessing that having a good example of the "right" way to do this
will be useful to many others.
Thanks.

i am also using another workaround using CSS trick(inlineStyle). if #{node.children} is null, i am placing an empty 10x10 white png image file over expand icon on tree node.
following code is nodeStamp of tree component.
<f:facet name="nodeStamp">
  <af:group id="g1">
    <af:image source="/images/spacer.png" id="i1" inlineStyle="border: 2px solid white; position: absolute; margin-left:-14px;" rendered="#{node.children == null}"/>
    <af:commandLink text="#{node.name}" id="cl1" partialSubmit="true"/>
  </af:group>
</f:facet>

Similar Messages

  • Tree component and loading xml files into text field

    Hello and thank you for taking the time to read my issue....
    I am making a simple self help application.  I have a tree component that loads the different catagories and topics for my help app dynamically via an xml file...no issues there.
    I then want it so that when the user cliecks on the actual topic that the TextArea component will load the info from another xml file using the name of the topic as the name of the xml file to make it that much easier for anyone to maintain this program.
    So far the code i have is this.
    myTreeListener.change = function(eventObject)
        var theSelectedNode = eventObject.target.selectedNode;
        var theSelectedNodeLabel = theSelectedNode.attributes.label;
        topicTextArea.text +=
    I am a little fuzzy when it comes to loading the xml file in.  Should i be loading html instead of xml is my other question as well?
    Thanks in advance for your help
    FG

    Check out the Oracle XDB Developer's Guide, Chapter 3. There is an example of using BFileName function to load the xml files from a directory object created using create or replace directory. It works really well.
    Ben

  • Tree Component with incremental auto-refresh?

    Is there a free (preferably) or commercial JSF tree component with a general AJAX-based incremental auto-refresh?
    Essentially when dealing with a tree of data which can lose or add nodes at any time, it would be nice to have an optional polling mechanism built into the tree that would check the server for tree insertion and removal events and handle any such events whenever they're found via incremental AJAX-based modifications to the tree -- not a full refresh. The same is true for tree node change events.
    To be clear this is not a substitute for handling client events -- the tree data is indicative of shared state and changes independently from user actions.

    I was following instructions from [http://niallcblogs.blogspot.nl/2009/06/auto-refreshing-adf-chart-objects-in.html]
    But I got it to work the way you say.
    But setting refresh="always" generates exceptions in even simple cases. Is it because I am using MySQL which does not have event notification support?

  • Custom icon per entry in the AS2 Tree Component (using CS3)

    I have a tree component that loads its data from an XML file and I wonder if I can customize every entry to have its own icon by adding an icon attribute to every entry in the XML and giving the tree an action to read that icon (which would exist in the library of the Flash file). My goal is to reproduce a tree within an application that my company is developing (it's for a training tool related to that application).
    My XML says something like <node label = 'Label' heading = 'LABEL' desc = 'Description' icon = 'icon1' />
    My label is what the tree displays, the heading is what the information dialog in the training tool displays as a title bar, the desc is what the training tool displays within the body of the text for the function description and the icon is what I want to be a reference to the graphic in the library to place as an icon in front of the item rather than use setStyle with the properties for disclosure, leaf, and folder icons.
    Is that possible? I haven't found a solution for it yet.

    I've never used the Tree component, so I'm just guessing here....
    There is a slight delay before the xml file loads and your tree has its data provider.
    Perhaps during that time there is no node at mTree.getTreeNodeAt(0) to open? Try adding this just before the last line of your code:
    trace("the node is: "+mTree.getTreeNodeAt(0));
    What do you get?
    You might need to move that code inside the xml's load event handler.
    Another thing is that the Flash components tend to work on an invalidate-then-wait-one-frame-to-redraw kind of model. So it is possible you will need to wait one frame after the xml has loaded and then tell it to open that node.
    The doLater method might help with that.
    var home:MovieClip=this;
    var xmlTreeData:XML = new XML();
    xmlTreeData.onLoad = function() {
    mTree.dataProvider = this.firstChild;
    mTree.doLater(home,"delay");
    xmlTreeData.ignoreWhite = true;
    xmlTreeData.load("xml/treeValues1.xml");
    mTree.setStyle("fontSize","11");
    mTree.setStyle("selectionColor","0xE0E0E0");
    mTree.setStyle("useRollOver",false);
    function delay(){ 

  • Tree Component Icons

    I'm using the tree component for a little Windows Parody I'm making. In my .fla, There's a tree component that loads an external XML file.  I can't figure out how to add custom icons to my component, though.
    I know it's possible to set the icons for just the default folder and file icons, but since it's a Windows Parody, there'll be different icons for different file types, folder types, etc.
    In other words,  I'd like to have a different icon for every item in my Tree component.
    How can I do this? 
    Here are the contents of my XML file:
    <node>
        <node label="Desktop">
    </node>
        <node label="Documents">
    <node label="Pictures" isBranch="true" />
    <node label="Movies" isBranch="true" />
    <node label="Games" isBranch="true" />
    <node label="Video" isBranch="true" />
    </node>
        <node label="Computer">
    <node label="Local Disk (C:)" isBranch="true" />
    <node label="Local Disk (D:)" isBranch="true" />
    <node label="DVD-RAM Drive (E:)" isBranch="true" />
    <node label="DVD/CD-RW Drive (F:)" isBranch="true" />
    </node>
    <node label="Readme.txt" isBranch="true" />
    </node>
    And the code on the first frame of my .fla file.  The Tree's name is "fileTree", and the XML file is "doors_explorerXML.xml".
    //Tree
    var fileDP:XML = new XML();
    fileDP.ignoreWhite = true;
    fileDP.load("doors_explorerXML.xml");
    fileDP.onLoad = function() {
        fileTree.dataProvider = this.firstChild;
    Also, I don't need to have an XML file loaded.  If there's an easy way that does it all within Flash, please tell me.  I just need to be able to handle events from the Tree. 

    Im having the same issue. I dont know how to change the tree icons separately with the xml. Is there anyone who knows how to do it?
    This is what I got so far. However, i can only get my first branch to show custom icons. I tried ALOT, but i guess I´m doing something completely wrong.
    Here is the code for my tree so far:
    my_xml = new XML();
    my_xml.ignoreWhite = true;
    my_xml.load("tree.xml");
    my_xml.onLoad = function(){
    myTree.dataProvider = this.firstChild;
    var folders = my_xml.firstChild.firstChild;
    var docs = folders.childNodes;
    for (var i=0; i < docs.length; i++){
    currDoc = docs[i];
    trace(docs[i]);
    var docIcon = currDoc.attributes.pic;
    switch(docIcon){
    case "pdf":
    myTree.setIcon(currDoc, "pdfIcon");
    break;
    case "word":
    myTree.setIcon(currDoc, "wordIcon");
    break;
    case "excel":
    myTree.setIcon(currDoc, "excelIcon");
    break;
    case "ie":
    myTree.setIcon(currDoc, "ieIcon");
    break;
    }//switch
    } //for
    };//onLoad
    And here is the XML I used:
    <node label="» Dokument typer">
    <node label="» links - document">
    <node label="test.url" url="http://www." pic="ie" info="test text" />
    <node label="test.doc" url="test.doc" pic="word" info="test text" />
    <node label="test.excel" url="test.xls" pic="excel" info="test text" />
    <node label="test.pdf" url="test.pdf" pic="pdf" info="test text." />
    </node>
    <node label="» Links - document">
    <node label="test URL" url="http://www." pic="ie" info="test text." />
    <node label="test URL" url="http://www." pic="ie" info="test text." />
    </node>
    </node>

  • Questions about AS2 Tree Component (Flash CS3)

    I have Flash application with a Tree component on the Stage. I'm using an XML file to create the structure of the Tree component.
    Each entry on my XML has the attributes id, label, heading, desc, and icon.
    My problem is that I can't seem to be able to set the Tree to default with the first node open.
    My code is:
    var xmlTreeData:XML = new XML();
    xmlTreeData.onLoad = function() {
    mTree.dataProvider = this.firstChild;
    xmlTreeData.ignoreWhite = true;
    xmlTreeData.load("xml/treeValues1.xml");
    mTree.setStyle("fontSize","11");
    mTree.setStyle("selectionColor","0xE0E0E0");
    mTree.setStyle("useRollOver",false);
    mTree.setIsOpen(mTree.getTreeNodeAt(0), true);
    My tree populates fine, and the handler I retrieve whatever item is clicked works great. However, the tree refuses to default to having that first node open.
    I'm also interested in placing custom icons into certain nodes via the icon attribute I've set in the XML, but that will have to come later I guess.

    I've never used the Tree component, so I'm just guessing here....
    There is a slight delay before the xml file loads and your tree has its data provider.
    Perhaps during that time there is no node at mTree.getTreeNodeAt(0) to open? Try adding this just before the last line of your code:
    trace("the node is: "+mTree.getTreeNodeAt(0));
    What do you get?
    You might need to move that code inside the xml's load event handler.
    Another thing is that the Flash components tend to work on an invalidate-then-wait-one-frame-to-redraw kind of model. So it is possible you will need to wait one frame after the xml has loaded and then tell it to open that node.
    The doLater method might help with that.
    var home:MovieClip=this;
    var xmlTreeData:XML = new XML();
    xmlTreeData.onLoad = function() {
    mTree.dataProvider = this.firstChild;
    mTree.doLater(home,"delay");
    xmlTreeData.ignoreWhite = true;
    xmlTreeData.load("xml/treeValues1.xml");
    mTree.setStyle("fontSize","11");
    mTree.setStyle("selectionColor","0xE0E0E0");
    mTree.setStyle("useRollOver",false);
    function delay(){ 

  • Ext. data source and Tree component

    Im using tree component and XMLConnector here.
    as far as i can see results in my tree (when testing my
    movie) it ouputs data thats loaded fom ext. XML file.
    But the problem is that it publishes [type Function] in the
    tree.
    no actual xml nodes are visible, just bunch of [type
    Function]
    ive also searched for info / tutorial how to publish actual
    xml data in the tree component but without any luck.
    So what should i do and how ?

    Solved
    xml tags needed just a label with attributes

  • On click at tree component it has to call SWF using XML

    Hi,
    I have created a flash file with name xmltoflash_tree.
    Incules a Tree component named "tree01". On my first frame of
    actions i have included "#include "test.as"". This is about my
    flash file
    In my Test.as :
    import mx.controls.Tree;
    var xmlLoader:XML = new XML();
    xmlLoader.ignoreWhite = true;
    xmlLoader.load("list.xml");
    xmlLoader.onLoad = function(success:Boolean):Void {
    tree01.dataProvider = this;
    tree01.initBranches();
    tree01.vScrollPolicy = "auto";
    Tree.prototype.initBranches = function(node:XMLNode):Void {
    if (node == undefined) {
    for (var i = 0; i < this.dataProvider.childNodes.length;
    i++) {
    this.initBranches(this.dataProvider.childNodes
    } else {
    if ( (node.attributes.isBranch == "true") &&
    !(this.getIsBranch(node)) ) {
    this.setIsBranch(node, true);
    if ( (node.attributes.isOpen == "true") &&
    !(this.getIsOpen(node)) ) {
    this.setIsOpen(node, true);
    for (var i = 0; i < node.childNodes.length; i++) {
    this.initBranches(node.childNodes);
    I created an XML file named as "list.xml" :
    Script inside this xml is :
    <?xml version="1.0" encoding="iso-8859-1"?>
    <node label="Select Application" isOpen="true">
    <node label="Application1" isBranch="true">
    <node label="Introduction to Application1"
    isBranch="true" >
    <node label="Testing1" />
    <node label="Testing2" />
    <node label="Testing3" />
    </node>
    </node>
    <node label="Application2" isBranch="true">
    <node label="Introduction to Application2"
    isBranch="true" >
    <node label="Testing1" />
    <node label="Testing2" />
    <node label="Testing3" />
    </node>
    </node>
    I have folder with name Treehelp. All my files are in this
    folder.
    xmltoflash_tree.fla
    test.as
    list.xml
    linktesting.swf
    I have SWF in the same folder named "linktesting.swf".
    I need to call "linktesting.swf" or any other swf files
    included in the same folder. when i click on "Testing1/ or any
    othe".
    Have to write the script in XML to call the swf file. Help me
    in this.
    Regards
    Ranjith Kumar. Bandi

    Add oneMore attribute in the XML Nodes,
    When selecting a Node in a Tree component you will recieve
    all the data of that particular xml node. using that you can load
    the Files
    <node label="Testing1" filePath="MyFirstSWF.swf"/>

  • Tree Component as swf

    I have a swf file that is a Tree Component... (So when it
    diplays it looks like a Directory structure with folders and files)
    Some nodes access url links... And some access .doc files on
    the network... This works fine when I run it from my local site,
    but when I run it on the remote site (Intranet server) the nodes
    that reference file paths so nothing, instead of opening the file,
    the url type links do work fine on the remote site.
    Any thoughts on why this might be occurring ? I am putting
    the swf and the associated xml file and html page on the remote
    site... Am I missing a file or setting on the server that I have
    locally? I am also including my .as file and xml file for review.
    Any help would be greatly appeciated.
    xml code:
    <node>
    <node label="Training Information" data="">
    <node label="HP Learning Center" url="
    http://h30187.www3.hp.com"
    />
    <node label="HP Class Schedule" url="
    http://h30187.www3.hp.com/all_courses.jsp"/>
    <node label="Excel Charting Tips" data="IT Web
    Docs/Advanced Tips and Tricks for Excel Charting.wmv" />
    <node label="Email Contacts" data="file:///P|/IT
    information/Tips/Contacts - Keeping track.doc" />
    <node label="Assigning Tasks in Outlook" data="IT Web
    Docs/Assigning and tracking tasks in Outlook.doc" />
    </node>
    <node label="Technical Documentation" data="">
    <node label="myMCC Info Guide" data="IT Web
    Docs/MyMccIntro.pdf" />
    <node label="MCC Webex Guide" data="IT Web
    Docs/MCCWebex.pdf" />
    <node label="Scudder Access Guide " data="IT Web
    Docs/AccessDWS-Scudder.pdf" />
    <node label="VPN Install Guide" data="IT Web
    Docs/MCCCitrixAccessGatewayVPN-Install.pdf" />
    <node label="VPN User Guide" data="IT Web
    Docs/MCCCitrixAccessGatewayVPN-Use.pdf" />
    <node label="Samsung i830 Guide" data="IT Web
    Docs/Samsung_i830_User_Guide.pdf" />
    <node label="Treo 700w Guide" data="IT Web
    Docs/treo_700w_user_manual.pdf" />
    </node>
    </node>
    Action Script code:
    import mx.controls.Tree;
    class TreeNavMenu extends MovieClip {
    var menuXML:XML;
    var menuTree:Tree;
    function TreeNavMenu() {
    // Set up the appearance of the tree and event handlers.
    menuTree.setStyle("fontFamily", "_sans");
    //menuTree.setStyle("fontSize", 6);
    menuTree.fontSize = 14;
    menuTree.setSize(250, 300);
    menuTree.move(0,0);
    // Load the menu XML.
    var treeNavMenu = this;
    menuXML = new XML();
    menuXML.ignoreWhite = true;
    menuXML.load("TreeNavMenu.xml");
    menuXML.onLoad = function() {
    treeNavMenu.onMenuLoaded();
    function change(event:Object) {
    if (menuTree == event.target) {
    var node = menuTree.selectedItem;
    // If this is a branch, expand/collapse it.
    if (menuTree.getIsBranch(node)) {
    menuTree.setIsOpen(node, !menuTree.getIsOpen(node), true);
    // If this is a hyperlink, jump to it.
    var url = node.attributes.url;
    var file = node.attributes.data;
    if (url) {
    getURL(url, "_blank");
    else {
    getURL(file, "_blank");
    // Clear any selection.
    menuTree.selectedNode = null;
    function onMenuLoaded() {
    menuTree.dataProvider = menuXML.firstChild;
    menuTree.addEventListener("change", this);
    This does work fine locally... But the file paths node do not
    work when I publish to the Intranet server.
    Thanks-Dave

    It is quite a pain in the rear to skin the AS2 components.
    And I don't know of many 3rd party components for AS2. I know of
    plenty AS3 3rd party components, but if you were using AS3
    components you wouldn't need a Tree to replicate the adobe video
    workshop type navigation, all you would need is the built in List
    component. If you can go sans icons, I would suggest using the AS2
    List to get the feel you're looking for.

  • Tree Component

    Hi ye,
    The code on my Flash tree component has:
    var treeL:Object = new Object();
    treeL.change = function() {
    var item = theTree.selectedItem;
    var earl = item.attributes.url;
    if(earl) {
    getURL(earl ,target=myIframe);
    the xml file it reads from has eg.
    <tree>
    <folder label="Test">
    <link label="TSample" url="one.html" />
    </tree>
    The myIframe target above is on the same html page as the
    tree component, but instead of loading the file "one.html" into
    the target myIframe, it gets loaded as a separate one.html
    page.
    The question is, how do I target an Iframe named myIframe
    with its layout controlled by a content id, from a Flash tree
    component on same html page, and get my one.html file to load into
    it??
    The one.html file currently loads as a separate hml page.
    thanks
    Colm

    Although tree component is not currently part of the reference implementation, example under EA3 release, contains a simple Tree implementation(included under example/components)that you can use as a starting point.
    -Jayashri

  • Tree component setIsOpen

    i have a tree component
    I'm loading an XML an i want to tell the component witch
    nodes to open
    The nodes that i want to open arr in an array called
    arrDeschise
    this is my code
    for (var i in arrDeschise) {
    var nod:XMLNode=arrDeschise
    trace(nod)
    treeDir.setIsOpen(nod, true);
    trace(treeDir.setIsOpen(nod, true))
    but it's not working
    please help

    The following works for me...

  • How do you change the Tree Component Icons?

    Hi,
    I have been trying to get to grips with the tree component. I
    want to
    customise it so that I can have a different icon for each
    different link.
    E.g. a QT logo for a video etc. If no valuse is found for the
    'icon'
    attribute it will just display the default.
    Within my XML file I have created a new attribute for each
    link called
    'icon' and has a value of 'movie.gif' or something similar.
    In my flash file, I have created the following code:
    theTree.iconFunction = function (node:XMLNode) {
    var iconNode:String = item.attributes.icon;
    if (iconNode != undefined) {
    return iconNode;
    However, it does not seem to work. My knowledge of
    ActionScript is pretty
    poor so I assume I have made a mistake in there somewhere.
    Can anyone help
    me with this?
    Thanks!

    Check out the Component Reference... you change the icon for
    a single node, as far as I know there's no automated process beyond
    that. So assuming your tree component instance is named "theTree"
    you might do this to change the icon of the first node:
    theTree.dataProvider = yourXML; // make sure you don't try to
    change the icon before you load data into the tree
    var theNode = theTree.getTreeNodeAt(0); // the first node in
    your tree
    theTree.setIcon(theNode,'myIcon'); // set the icon
    Where "myIcon" is a MovieClip you have in your library that
    you have set the "linkage identifier" as "myIcon".
    That iconFunction doesn't make a whole lot of sense to me,
    because first of all I don't know why it would be attached to
    theTree, and second it's referring to "item" which is not defined,
    and third its taking the parameter "node" and not doing anything
    with it. But perhaps there is some cool way to make a single
    function which handles icons for your entire tree automatically,
    that would certainly be nice.
    However, like I said, as far as I know that function will do
    nothing without calling tree.setIcon() in some way. I just made a
    function which might do what you want -- it recursively loops
    through an entire tree and sets it's icon based on the XML
    attribute "icon":
    function setAllIcons(branch){
    for(var i in branch.childNodes){
    var node = branch.getTreeNodeAt(i);
    theTree.setIcon(node,node.attributes['icon']);
    if(node.hasChildNodes){
    setAllIcons(node);
    So basically, you run setAllIcons(theTree.dataProvider) after
    you have loaded and applied the XML.

  • Tree component children displays [Object, Object] need help displaying the names :)

    hey guys... i've run into yet another problem...
    i have a tree component that gets its data from a httpservice.. xml file.
    i then pasrse thru the recieved xml to create a dataprovider for the tree component. the code for that is below...
    <mx:Tree id="tree" dataProvider="{treeData2}" showRoot="false" width="50%" height="100%" />
    [Bindable] public var treeData2:ArrayCollection = new ArrayCollection;
    [Bindable] public var treeData:Object;
    public var resultArr:Object;
    public function initNavTab():void{
        var navService:HTTPService = new HTTPService();
        navService.url = "http://www.apxalarm.com/pages/getnav";
        navService.method = "POST";
        navService.useProxy = false;
        navService.resultFormat = "e4x";
        //navService.resultFormat = "array";
        navService.addEventListener(ResultEvent.RESULT, returnNavData);
        navService.addEventListener(FaultEvent.FAULT, navDataFault);
        navService.send();
    public function returnNavData(event:ResultEvent):void{
        navData = event.result;
        //resultArr = event.result;
        Alert.show("load complete");
        tree_labelFunc(navData);
    public function navDataFault(event:FaultEvent):void{
        Alert.show(event.fault.faultDetail);
    public function tree_labelFunc(item:Object):void{
        var node:XML = XML(item);
        var nav:XMLList = new XMLList();
        nav = node.sections;
        var i:Number = 0;
        for each (var section:XML in nav.section){
            var obj:Object = new Object();
            obj.label = section.name;
            obj.urlName = section.urlName;
            obj.children = new ArrayCollection;
                for each(var nav1:XML in section.navs.nav){
                    obj.children.addItem([{label: nav1.name}]);
            treeData2.addItem(obj);
    the tree_labelFunc parces thru the xml and creates the appropriate structure i need to be displayed in the tree component... but unfortunately the children of the tree component only shows [Object, Object]
    can someone show me how to display the labels instead of the Object???
    thank you soo much in advace guys!!! i really appretiate it!!!
    oh and this is part of the xml that it is pulling
    <siteMap>
      <sections>
        <section>
          <name>About APX</name>
          <urlName>about</urlName>
          <position>1</position>
          <defaultaction>/about/mission</defaultaction>
          <navs>
            <nav>
              <name>Our Mission</name>
              <urlName>mission</urlName>
              <position>1</position>
              <defaultaction>13</defaultaction>
              <subNavs/>
            </nav>
            <nav>
              <name>Links</name>
              <urlName>links</urlName>
              <position>4</position>
              <subNavs>
                <nav>
                  <name>iamapx.com</name>
                  <urlName>iamapx</urlName>
                  <position>1</position>
                  <defaultaction>http://www.iamapx.com</defaultaction>
                  <subNavs/>
                </nav>
                <nav>
                  <name>apxgivesback.com</name>
                  <urlName>agb</urlName>
                  <position>2</position>
                  <defaultaction>http://www.apxgivesback.com</defaultaction>
                  <subNavs/>
                </nav>
              </subNavs>
            </nav>
            <nav>
              <name>Newsletter</name>
              <urlName>newsletter</urlName>
              <position>3</position>
              <defaultaction>37</defaultaction>
              <subNavs/>
            </nav>
          </navs>
        </section>
        <section>
        </section>
        <section>
        </section>
        <section>
        </section>
        <section>
        </section>
        <section>
        </section>
      </sections>
    </siteMap>
    i need the name tags in the xml to be displayed in the tree component....
    again thank you soo much in advace for your help!!

    thank you soo much for your quick responce alex!!
    the toXMLString is exactly like the xml
    <siteMap>
      <sections>
        <section>
          <name>About APX</name>
          <urlName>about</urlName>
          <position>1</position>
          <defaultaction>/about/mission</defaultaction>
          <navs>
            <nav>
              <name>Our Mission</name>
              <urlName>mission</urlName>
              <position>1</position>
              <defaultaction>13</defaultaction>
              <subNavs/>
            </nav>
            <nav>
              <name>Links</name>
              <urlName>links</urlName>
              <position>4</position>
              <subNavs>
                <nav>
                  <name>iamapx.com</name>
                  <urlName>iamapx</urlName>
                  <position>1</position>
                  <defaultaction>http://www.iamapx.com</defaultaction>
                  <subNavs/>
                </nav>
                <nav>
                  <name>apxgivesback.com</name>
                  <urlName>agb</urlName>
                  <position>2</position>
                  <defaultaction>http://www.apxgivesback.com</defaultaction>
                  <subNavs/>
                </nav>
              </subNavs>
            </nav>
            <nav>
              <name>Newsletter</name>
              <urlName>newsletter</urlName>
              <position>3</position>
              <defaultaction>37</defaultaction>
              <subNavs/>
            </nav>
          </navs>
        </section>
        <section>
          <name>APX Security Systems</name>
          <urlName>apxsystems</urlName>
          <position>2</position>
          <defaultaction>/apxsystems/systems/products</defaultaction>
          <navs>
            <nav>
              <name>Service Areas</name>
              <urlName>serviceareas</urlName>
              <position>1</position>
              <defaultaction>25</defaultaction>
              <subNavs/>
            </nav>
            <nav>
              <name>Systems</name>
              <urlName>systems</urlName>
              <position>2</position>
              <defaultaction>27</defaultaction>
              <subNavs>
                <nav>
                  <name>Get A System</name>
                  <urlName>get</urlName>
                  <position>2</position>
                  <defaultaction>27</defaultaction>
                  <subNavs/>
                </nav>
                <nav>
                  <name>Browse Products</name>
                  <urlName>products</urlName>
                  <position>1</position>
                  <defaultaction>28</defaultaction>
                  <subNavs/>
                </nav>
                <nav>
                  <name>Refer A Friend</name>
                  <urlName>refer</urlName>
                  <position>3</position>
                  <defaultaction>38</defaultaction>
                  <subNavs/>
                </nav>
              </subNavs>
            </nav>
          </navs>
        </section>
        <section>
          <name>Customer Support</name>
          <urlName>support</urlName>
          <position>3</position>
          <defaultaction>/support/specialist</defaultaction>
          <navs>
            <nav>
              <name>Technical Support</name>
              <urlName>tech</urlName>
              <position>2</position>
              <defaultaction>32</defaultaction>
              <subNavs>
                <nav>
                  <name>Troubleshooting</name>
                  <urlName>troubleshooting</urlName>
                  <position>2</position>
                  <defaultaction>32</defaultaction>
                  <subNavs/>
                </nav>
              </subNavs>
            </nav>
            <nav>
              <name>Speak To A Specialist</name>
              <urlName>specialist</urlName>
              <position>1</position>
              <defaultaction>30</defaultaction>
              <subNavs/>
            </nav>
            <nav>
              <name>Move Options</name>
              <urlName>moves</urlName>
              <position>3</position>
              <defaultaction>35</defaultaction>
              <subNavs/>
            </nav>
          </navs>
        </section>
        <section>
          <name>Home Safety</name>
          <urlName>safety</urlName>
          <position>4</position>
          <defaultaction>/safety/outside</defaultaction>
          <navs>
            <nav>
              <name>Indoor Tips</name>
              <urlName>inside</urlName>
              <position>1</position>
              <defaultaction>17</defaultaction>
              <subNavs/>
            </nav>
            <nav>
              <name>Outdoor Tips</name>
              <urlName>outside</urlName>
              <position>2</position>
              <defaultaction>18</defaultaction>
              <subNavs/>
            </nav>
          </navs>
        </section>
        <section>
          <name>Customer Stories</name>
          <urlName>stories</urlName>
          <position>5</position>
          <defaultaction>/stories/videos</defaultaction>
          <navs>
            <nav>
              <name>Videos</name>
              <urlName>videos</urlName>
              <position>3</position>
              <defaultaction>15</defaultaction>
              <subNavs/>
            </nav>
            <nav>
              <name>Read Stories</name>
              <urlName>read</urlName>
              <position>1</position>
              <defaultaction>19</defaultaction>
              <subNavs/>
            </nav>
            <nav>
              <name>Tell Your Story</name>
              <urlName>tell</urlName>
              <position>2</position>
              <defaultaction>20</defaultaction>
              <subNavs/>
            </nav>
          </navs>
        </section>
        <section>
          <name>Newsroom</name>
          <urlName>press</urlName>
          <position>6</position>
          <defaultaction>/press/compprofile</defaultaction>
          <navs>
            <nav>
              <name>Press Releases</name>
              <urlName>pr</urlName>
              <position>2</position>
              <defaultaction>21</defaultaction>
              <subNavs/>
            </nav>
            <nav>
              <name>Media Kit</name>
              <urlName>media</urlName>
              <position>3</position>
              <defaultaction>22</defaultaction>
              <subNavs/>
            </nav>
            <nav>
              <name>Company Profile</name>
              <urlName>compprofile</urlName>
              <position>1</position>
              <defaultaction>34</defaultaction>
              <subNavs/>
            </nav>
            <nav>
              <name>Contact Us</name>
              <urlName>contact</urlName>
              <position>4</position>
              <defaultaction>39</defaultaction>
              <subNavs/>
            </nav>
          </navs>
        </section>
      </sections>
    </siteMap>
    i need to subNavs to be available within the tree dropdown...

  • Flex 2 Tree component vertical scrollbar not updating

    I am using a Tree component to hold a very large dataset. So
    instead of loading the whole tree view at once, I only load the
    first level and make webservice calls every time the user opens a
    node using the itemOpen event handler. My only problem is that the
    data shows but the scrollbar does not appear. When I close said
    folder, and reopen, then the scrollbar appears.
    How should I notify the Tree component that the data has
    changed and that it should update the scrollbar. I dont want to use
    ItemRenderer if I dont have to.
    Ive tried these but they dont work:
    m_tree.dataProvider.refresh();
    List(m_tree).invalidateDisplayList();
    List(m_tree).validateNow();
    m_tree.expandItem(m_selectedNode, true, true, true);
    Thanks

    didn't work for me, but i found something that did:
    // set the child data
    m_selectedNode.setChildren( node_xml.children() );
    // dont show it
    m_tree.expandChildrenOf(m_selectedNode, false);
    // show it w/o raising an event
    m_tree.expandItem(m_selectedNode, true, true, false);

  • Change the Tree Component background

    Does anyone know how can i change the Tree Component
    background ?
    PLS HELP

    Check out the Component Reference... you change the icon for
    a single node, as far as I know there's no automated process beyond
    that. So assuming your tree component instance is named "theTree"
    you might do this to change the icon of the first node:
    theTree.dataProvider = yourXML; // make sure you don't try to
    change the icon before you load data into the tree
    var theNode = theTree.getTreeNodeAt(0); // the first node in
    your tree
    theTree.setIcon(theNode,'myIcon'); // set the icon
    Where "myIcon" is a MovieClip you have in your library that
    you have set the "linkage identifier" as "myIcon".
    That iconFunction doesn't make a whole lot of sense to me,
    because first of all I don't know why it would be attached to
    theTree, and second it's referring to "item" which is not defined,
    and third its taking the parameter "node" and not doing anything
    with it. But perhaps there is some cool way to make a single
    function which handles icons for your entire tree automatically,
    that would certainly be nice.
    However, like I said, as far as I know that function will do
    nothing without calling tree.setIcon() in some way. I just made a
    function which might do what you want -- it recursively loops
    through an entire tree and sets it's icon based on the XML
    attribute "icon":
    function setAllIcons(branch){
    for(var i in branch.childNodes){
    var node = branch.getTreeNodeAt(i);
    theTree.setIcon(node,node.attributes['icon']);
    if(node.hasChildNodes){
    setAllIcons(node);
    So basically, you run setAllIcons(theTree.dataProvider) after
    you have loaded and applied the XML.

Maybe you are looking for

  • IPod Touch sync with shuffle

    Hi all, my son has a shuffle which I setup for him downloaded songs ect; it has been working fine. now he got a Touch for X-mas and I set it up for him but it would not take my account info so I had to creat a new one, what i want to do is get all hi

  • IWeb URL

    Can not find my pre-Cloud web pages and photo galleries... What was the former me.co/Mac.com / AppleID  / we page. URL ?? So frustrating, I can not find my photos Thanks in advance

  • Include icon graphics in table of contents (TOC)?

    Question Is it possible to have icons (i.e. inline anchored frames) automatically appear in the TOC? (We translate into 15+ languages, so adding the graphics manually to the TOC after it's generated isn't really a viable option.) Scenario In our manu

  • 6300 callers name not shown

    hi, i bought a nokia 6300 two days ago and have been registering it and moving my numbers across etc. but one thing i can't seem to do (and it sounds really silly) is get a callers name to appear when they ring me. whenever i receive a call, the phon

  • Printing problems in Lion - Broken pipe

    I am having problems with printing from Lion, particularly to some HP printers in my office network.  I have tried removing and then adding the printers, have tried printing with JetDirect, as an IP, and just letting Lion decide.  The jobs seem to be