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
>
classroot, cloneManager, data, datapath, defaultplacement, id, ignoreplacement, immediateparent, inited, initstage, name, nodeLevel, options, parent, placement, styleclass, subnodes, transition
Methods
clearSelection, getSelection, isMultiSelect, isRangeSelect, isSelected, select, unselect
animate, applyConstraintMethod, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getOption, getUID, init, lookupSourceLocator, releaseConstraint, releaseConstraintMethod, searchImmediateSubnodes, searchSubnodes, setOption, setSelected, updateData
Events
Copyright © 2002-2010 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.