<dataselectionmanager>
A selection manager for views generated by a lazily-replicated datapath.

JavaScript: lz.dataselectionmanager

If a datapath's replication attribute is set to "lazy", then a match to multiple nodes will create an lz.LazyReplicationManager instead of an lz.ReplicationManager. The lazy replication manager creates only enough replicated views in order to display the data, so there is not a view for each data node. This enables the display of very large datasets.

With lazy replication you must use a lz.dataselectionmanager instead of a lz.selectionmanager. The lz.dataselectionmanager will operate on the data itself, instead of on the views (which may not be present if the data has scrolled out of view). For each dataset you are controlling, you can have only one lz.dataselectionmanager operating on it.

As with a lz.selectionmanager, ctrl-click will select multiple items and shift-click will select a range. To modify this behavior, you can extend the lz.dataselectionmanager and implement isRangeSelect and isMultiSelect.

<canvas height="200">
        <dataset name="mydata">
            <list>
            <item>tricycle</item>
            <item>train</item>
            <item>racecar</item>
            <item>scooter</item>
            <item>bicycle</item>
            <item>rollerblades</item>
            <item>iceskates</item>
            <item>minivan</item>
            <item>sailboat</item>
            <item>motorboat</item>
            </list>
        </dataset>

        <class name="selectme" onclick="immediateparent.selector.select(this)" height="17" width="100" bgcolor="white">
            <text datapath="text()"/>
            <method name="setSelected" args="isselected">
            this.setAttribute('bgcolor', isselected ? 'yellow' : 'white');
            </method>
        </class>

        <view height="70" clip="true">
            <view>
            <dataselectionmanager name="selector"/>
            <selectme>
                <datapath xpath="mydata:/list/item" replication="lazy"/>
            </selectme>
            </view>
            <scrollbar/>
        </view>
        </canvas>

Attributes inherited from <selectionmanager>

sel, toggle

Methods

getSelection()
dataselectionmanager.getSelection();
Returns a list of datapointers, which point to the selected records
Returns Type Description
  Array A list of datapointers

Methods inherited from lz.Eventable

destroy, setAttribute

Events

Events inherited from <node>

onconstruct, ondata, oninit

Events inherited from lz.Eventable

ondestroy