PDA

View Full Version : Need help in creating an opttree with checkboxes


p_durga
09-08-2009, 08:40 AM
Can some one provide an example on how to display the checkboxes in opttree. I have tried with Checktree code base provided in the forums but it is not working for the latest lps4.4.1 could some one help me in this. Here is the code snippet i am trying to do

<canvas debug="true" >
<include href="incubator/opttree/opttree.lzx"/>
<dataset name="ds" >
<root>
<tab name="Unit Tests">

<node name="Quick">
<node name="Memory Test" location="">
<Description>xxxxxxxxxxxxxxxxxxxxxx.</Description>
<node name="read" location="" leaf="true">
<Description>xxxxxxxxxxxxxxxxxxxxxx.</Description>

</node>
<node name="write" location="" leaf="true">
<Description>xxxxxxxxxxxxxxxxxxxxxx.</Description>

</node>
<node name="read/modify/write" location="" leaf="true">
<Description>xxxxxxxxxxxxxxxxxxxxxx.</Description>

</node>
<node name="memset" location="" leaf="true">
<Description>xxxxxxxxxxxxxxxxxxxxxx.</Description>

</node>
<node name="memcpy" location="" leaf="true">
<Description>xxxxxxxxxxxxxxxxxxxxxx.</Description>

</node>
<Argument name="size">t</Argument>
<Argument name="path" >x</Argument>

</node>
</node>
<node name="Comprehensive"/>
<node name="Advanced"/>
</tab>
</root>
</dataset>

<view width="${parent.width}" height="${parent.height}">

<tree datapath="ds:/root[1]/tab" text="$path{'@name'}" >
<tree datapath="*" text="$path{'@name'}" >
<!-- <tree datapath="Test/@name" text="$path{'@name'}" open="true"
icon="null" isleaf="$path{'@leaf'}" /> -->
<opttree nodepath="node" nodeclass="checkbox"
datapath="${parent.datapath}" />
</tree>
</tree>
<scrollbar />
</view>

</canvas>

I am getting the following error "ERROR @incubator/opttree/opttree.lzx#46: call to undefined method 'setNodes'"