[Laszlo-user] Strange behaviour of grids

P T Withington ptw at pobox.com
Thu Jun 18 06:18:57 PDT 2009


This doesn't surprise me.  If I recall, the selection management  
directly modifies the in-memory dataset, so if you have two bindings  
of the same dataset, the selection management is likely to get  
confused.  The selection manager for lazy replication is a little more  
careful (since it cannot rely on the selected item being in memory),  
but I think it also has some bugs.

This would be a good project for an external contributor:  to rewrite  
the selection manager to maintain it's own state an not to modify the  
dataset.  Then there would only need to be one selection manager  
implementation -- you would not need a different one for lazy  
replication.

On 2009-06-18, at 06:57EDT, Marco Lettere wrote:

> Hello everyone,
> if I bind two grids on the same data I get very strange and  
> inconsitent
> behaviour with selections.
> I'm using OL 4.3 and my dev box is running flash9 on firefox for  
> linux.
> Firstly I'm not allowed to select the same row in both grids and after
> trying, the behaviour is even more bizarre. It's hardly explainable,
> please try it out and let me know if this is a known issue/feature/bug
> because I wasn't able to find anything about it.
> Thanks a lot for your support,
> M.
>
>
> This is the example code which is actually a small augmentation of the
> example on the OL reference page:
>
> <canvas debug="true">
>  <dataset name="contacts" request="true"
>   src="http://www.openlaszlo.org/lps/demos/contacts/ 
> contactsdata.xml"/>
>   <simplelayout axis="y"/>
>   <grid datapath="contacts:/resultset" id="g1">
>     <gridcolumn showheader="false" width="50">
>       <view bgcolor="#CCCCCC" width="${parent.width}"
> placement="header" height="${parent.immediateparent.height-1}"/>
>       <text datapath="position()"/>
>     </gridcolumn>
>     <gridcolumn width="200"> Name
>       <text datapath="@displayname" resize="false"/>
>     </gridcolumn>
>   </grid>
>   <grid datapath="contacts:/resultset" id="g2">
>     <gridcolumn showheader="false" width="50">
>       <view bgcolor="#CCCCCC" width="${parent.width}"
> placement="header" height="${parent.immediateparent.height-1}"/>
>       <text datapath="position()"/>
>     </gridcolumn>
>     <gridcolumn width="200"> Name
>       <text datapath="@displayname" resize="false"/>
>     </gridcolumn>
>   </grid>
> </canvas>
>
> -- 
> DcorE
>



More information about the Laszlo-user mailing list