thriputapriya
07-20-2004, 07:37 AM
Hi Antun,
In my example code i have problem,here i am using the one dataset for loading that data from database.But i want read different values from same dataset.First time i will read one value for a text by passing one value through setParams method.At second time if i try to read the second value for another text by passing second values at that time the later loaded old values are updated by the new ones. How to rectify this problem for same dataset.
this is below code snippet:
<dataset name="mydataset" src="mydata.jsp" autorequest="false" type="http" />
<tree open="true" text="World">
<tree text="Country" isleaf="true" />
<tree open="true" text="State">
<method event="onclick">
var topic=canvas.datasets.mydataset;
var t1="StateName";
topic.setQueryParams({ topic:t1} );
topic.doRequest();
</method>
<view datapath="sub_category">
<tree datapath="text()" isleaf="true"/ > </view>
<tree text="StateName2" isleaf="true" />
<tree text="City1" isleaf="true" />
</tree>
<tree open="true" text="City2" >
<method event="onclick">
var topic=canvas.datasets.mydataset;
var t1="City2";
topic.setQueryParams({ topic:t1} );
topic.doRequest();
//arttxt.showcontent();
</method>
<view datapath="sub_category">
<tree datapath="text()" isleaf="true"/ >
</view>
</tree>
</tree>
Thanks,
-thriputapriya
In my example code i have problem,here i am using the one dataset for loading that data from database.But i want read different values from same dataset.First time i will read one value for a text by passing one value through setParams method.At second time if i try to read the second value for another text by passing second values at that time the later loaded old values are updated by the new ones. How to rectify this problem for same dataset.
this is below code snippet:
<dataset name="mydataset" src="mydata.jsp" autorequest="false" type="http" />
<tree open="true" text="World">
<tree text="Country" isleaf="true" />
<tree open="true" text="State">
<method event="onclick">
var topic=canvas.datasets.mydataset;
var t1="StateName";
topic.setQueryParams({ topic:t1} );
topic.doRequest();
</method>
<view datapath="sub_category">
<tree datapath="text()" isleaf="true"/ > </view>
<tree text="StateName2" isleaf="true" />
<tree text="City1" isleaf="true" />
</tree>
<tree open="true" text="City2" >
<method event="onclick">
var topic=canvas.datasets.mydataset;
var t1="City2";
topic.setQueryParams({ topic:t1} );
topic.doRequest();
//arttxt.showcontent();
</method>
<view datapath="sub_category">
<tree datapath="text()" isleaf="true"/ >
</view>
</tree>
</tree>
Thanks,
-thriputapriya