this is almost certainly a type mismatch; 1 != "1"
Try
dp.setNodeAttribute('vis', "1" );
A
On Jan 23, ChrisK wrote:
> In the following example, I've set the datapath to replicate views for the
> data nodes that have vis="1".
>
> This works initially, but when I modify the dataset at runtime (add boxes
> button) so that all data nodes have vis="1", the new views are not replicated
> as expected.
>
> Am I doing something wrong? Is there a way to force the replication to kick
> off again?
>
> thanks in advance.
>
> -chrisk
>
> <canvas>
> <dataset name="foo">
> <items>
> <item vis="1"/>
> <item vis="1"/>
> <item vis="0"/>
> <item vis="0"/>
> <item vis="0"/>
> <item vis="0"/>
> <item vis="0"/>
> </items>
> </dataset>
>
>
> <view>
> <view width="5" height="5" bgcolor="red">
> <datapath xpath="foo:/items/[EMAIL PROTECTED] = '1']"
> rerunxpath="true"/>
> </view>
> <simplelayout axis="y" spacing="2"/>
> </view>
>
>
> <datapointer id="mydp" xpath="foo:/items"/>
>
> <button x="50" text="add more boxes">
>
> <method event="onclick">
> var dp = mydp.dupePointer();
> dp.selectChild();
>
> while( dp.selectNext() ) {
> dp.setNodeAttribute('vis', 1);
> }
>
> </method>
> </button>
> </canvas>
>
> _______________________________________________
> Laszlo-user mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user