ctenov
12-07-2006, 04:21 AM
Hello guys,
I have noted a strange behavior when multiselecting textlistitems. Maybe any guru could help. See the code:
<canvas bgcolor="#EAEAEA" width="640" height="700">
<dataset name="items">
<item value="item1" selected="true">item one</item>
<item value="item2">item two</item>
<item value="item3">item three</item>
<item value="item4" selected="true">item four</item>
<item value="item5">item five</item>
<item value="item6">item six</item>
</dataset>
<list id="a3" x="10" y="20" multiselect="true" width="130" shownitems="7">
<textlistitem datapath="items:/item" text="$path{'text()'}" value="$path{'@value'}" selected="$path{'@selected'}"/>
</list>
<?ignore
<dataset name="ditem" src="http://someurl/ditem.xml" request="true"/>
<textlistitem datapath="ditem:/items/item" text="$path{'text()'}" value="$path{'@value'}" selected="$path{'@selected'}"/>
?>
</canvas>
If you execute the above code all things happens well: two items are selected.
But if you get the dataset and put it in a file (ditem.xml) and reference it by 'http://...' like I exemplify in "ignore" part of the code, no more than one item (the last one) is selected.
I search a lot and discover that if you go into "baselist.lzx" file and change line 358 from
"} else if (this._initcomplete) {"
to
"} else if (false) {"
two itens are selected as expected but in this case I canīt do any other selection because I mess with the logic of the baselist's program.
This behavior says me that something about '_initcomplete' is diferent between the aproachs (embedded dataset x http dataset), but I canīt discover how to fix it with no mess of behavior.
Could anyone help ? Thanks !
I have noted a strange behavior when multiselecting textlistitems. Maybe any guru could help. See the code:
<canvas bgcolor="#EAEAEA" width="640" height="700">
<dataset name="items">
<item value="item1" selected="true">item one</item>
<item value="item2">item two</item>
<item value="item3">item three</item>
<item value="item4" selected="true">item four</item>
<item value="item5">item five</item>
<item value="item6">item six</item>
</dataset>
<list id="a3" x="10" y="20" multiselect="true" width="130" shownitems="7">
<textlistitem datapath="items:/item" text="$path{'text()'}" value="$path{'@value'}" selected="$path{'@selected'}"/>
</list>
<?ignore
<dataset name="ditem" src="http://someurl/ditem.xml" request="true"/>
<textlistitem datapath="ditem:/items/item" text="$path{'text()'}" value="$path{'@value'}" selected="$path{'@selected'}"/>
?>
</canvas>
If you execute the above code all things happens well: two items are selected.
But if you get the dataset and put it in a file (ditem.xml) and reference it by 'http://...' like I exemplify in "ignore" part of the code, no more than one item (the last one) is selected.
I search a lot and discover that if you go into "baselist.lzx" file and change line 358 from
"} else if (this._initcomplete) {"
to
"} else if (false) {"
two itens are selected as expected but in this case I canīt do any other selection because I mess with the logic of the baselist's program.
This behavior says me that something about '_initcomplete' is diferent between the aproachs (embedded dataset x http dataset), but I canīt discover how to fix it with no mess of behavior.
Could anyone help ? Thanks !