Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to declare this tree....

    Hi,
    My XML looks like
    <NodeT>
    <prp1> 1</prp1>
    <prp2>val1</prp2>
    </NodeT>

    <NodeT>
    <prp1> 2</prp1>
    <prp2>val2</prp2>
    </NodeT>

    <NodeT>
    <NodeT>
    <prp1>4</prp1>
    <prp2>val4</prp2>
    </NodeT>
    <prp1> 3</prp1>
    <prp2>val3</prp2>
    </NodeT>

    I declared the tree object as below

    isc.TreeGrid.create({
    ID: "DS12",
    width: 500,
    height: 400,
    dataSource: "DS1",
    autoFetchData: true,
    nodeIcon:"icons/16/person.png",
    folderIcon:"icons/16/person.png",
    showOpenIcons:false,
    showDropIcons:false,
    closedIconSuffix:""
    });

    isc.DataSource.create({
    ID:"DS1",
    dataFormat:"xml",
    dataProtocol: "postParams",
    dataURL:"/s.action",
    recordXPath:"//NodeT",
    fields:[
    {type:"text", title:"Name", name:"prp2"},
    {type:"integer", required:true, primaryKey:true, name:"prp1"},
    {childrenProperty:true, name:"NodeT.NodeT"}
    ]
    });

    Ofcourse this isn't working, What am I missing. Specifically how to declare the Fields where I want the Tree to be displayed as

    val1
    val2
    val3
    val4 ( as a child to val3 node).
    Last edited by Stem; 30 Jul 2007, 08:42.

    #2
    Hi Stem,

    Take a look at the tree databinding overview and the examples it points to. The most immediate problem is that you field should "NodeT.NodeT" should be just "NodeT".

    Comment

    Working...
    X