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).
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).
Comment