pydyp
06-24-2007, 04:57 AM
Suppose:
<canvas debug="true">
<dataset name="myDataset" src="..." type="http" querytype="POST" request="false"/>
<method name="Case1">
Debug.write('Case1');
</method>
<method name="Case2">
Debug.write('Case1');
</method>
<button text="Case1">
<handler name="onclick">
...
myDataset.doRequest();
</handler>
</button>
<button text="Case2">
<handler name="onclick">
...
myDataset.doRequest();
</handler>
</button>
</canvas>
I would like, before doing the request, to choose the ondata method of the dataset.
Ex:
when I click on the button1 -> doRequest -> ondata: method Case1
when I click on the button2 -> doRequest -> ondata: method Case2.
I know it's possible to do that with LzDelegate, but I dont understand how.
Could someone show me the code to write.
Thank you.
Sorry for my bad english
<canvas debug="true">
<dataset name="myDataset" src="..." type="http" querytype="POST" request="false"/>
<method name="Case1">
Debug.write('Case1');
</method>
<method name="Case2">
Debug.write('Case1');
</method>
<button text="Case1">
<handler name="onclick">
...
myDataset.doRequest();
</handler>
</button>
<button text="Case2">
<handler name="onclick">
...
myDataset.doRequest();
</handler>
</button>
</canvas>
I would like, before doing the request, to choose the ondata method of the dataset.
Ex:
when I click on the button1 -> doRequest -> ondata: method Case1
when I click on the button2 -> doRequest -> ondata: method Case2.
I know it's possible to do that with LzDelegate, but I dont understand how.
Could someone show me the code to write.
Thank you.
Sorry for my bad english