twashing
08-19-2003, 10:07 AM
I have a class that needs to talk to a server resource. The component needs a dataset i) so that it can pass info btn client and server using 'doRequest'. ii) so that child components can bind thier datapaths to the dataset. It will not know where that resource is until something creates it and gives it server information.
I first tried to pass my class a datapointer. I am able to get a dataset from the datapointer with 'pointer.getDataset()'. I can use that dataset to make a GET request. Passing server information is easy. I am having difficulty binding components to a dataset that was passed by a method.
ex)
<class name="clazz">
<attribute name="postset"/>
<attribute name="getset"/>
<method name="setPOST" args="pp">
this.postset = pp.getDataset();
</method>
<method name="setGET" args="gp">
this.getset = gp.getDataset();
</method>
<!-- THIS IS THE BIT THAT DOES NOT WORK -->
<wdiget datapath="getset:/" name="zzz"/>
</class>
** But I CANNOT find a way to bind child components to a dataset that was passed into a class. All examples show widgets (texts, dropdowns, etc) binding to a dataset that been hardcoded under the canvas. I've tried setting the "when" attribute to "always" - not luck.
Has anyone tried this before? Has anyone found a solution?
Timothy Washington
I first tried to pass my class a datapointer. I am able to get a dataset from the datapointer with 'pointer.getDataset()'. I can use that dataset to make a GET request. Passing server information is easy. I am having difficulty binding components to a dataset that was passed by a method.
ex)
<class name="clazz">
<attribute name="postset"/>
<attribute name="getset"/>
<method name="setPOST" args="pp">
this.postset = pp.getDataset();
</method>
<method name="setGET" args="gp">
this.getset = gp.getDataset();
</method>
<!-- THIS IS THE BIT THAT DOES NOT WORK -->
<wdiget datapath="getset:/" name="zzz"/>
</class>
** But I CANNOT find a way to bind child components to a dataset that was passed into a class. All examples show widgets (texts, dropdowns, etc) binding to a dataset that been hardcoded under the canvas. I've tried setting the "when" attribute to "always" - not luck.
Has anyone tried this before? Has anyone found a solution?
Timothy Washington