Hello,
I have a question to data replication.
I have the problem of setting the datapath of the view, when the dataset is
part of the same class.
If the dataset for the replicated view is part of the canvas, the "location
path" of the datapath is the name of the dataset.
datapath="dataset1:/data"
In my example the dataset "innerDataset" is part of a class. In the same class
there is also the view to be replicated.
Does anybody know how I have to set the datapath of the view so that the view
becomes replicated?
Kind Regards,
Marc
example code:
-------------------
<canvas debug="true">
<dataset name="dataset1">
<data name="a"/>
<data name="b"/>
<data name="c"/>
</dataset>
<class name="myView" extends="view" >
<dataset name="innerDataset">
<data name="A"/>
<data name="B"/>
<data name="C"/>
</dataset>
<simplelayout axis="y" spacing="5"/>
<!-- data replication: the dataset is part of the canvas -->
<view width="50" height="50" bgcolor="0xFF0000"
datapath="dataset1:/data"/>
<!-- data replication: the dataset is part of the same class -->
<view width="50" height="50" bgcolor="0x0000FF">
<handler name="oninit">
// this does not work
this.setAttribute("datapath",parent.innerDataset.datapath+":/data");
</handler>
</view>
</class>
<myView/>
</canvas>