The lz.ResizeReplicationManager
extends
the capabilities of the
lz.LazyReplicationManager
so that the
elements in the replication can be resized in their axis. All of
the restrictions on the use of the
lz.LazyReplicationManager
apply to the
lz.ResizeReplicationManager
except for this
one:
Note that the performance of a resize replication manager is related to the number of items displayed and the length of the data, whereas the lazy replication manager performance is only determined by the number of items displayed.
Example 13. Using a resize replication manager to display a large dataset when the elements resize
<canvas
height
="200
">
<dataset
name
="vegetables
">
<celery
/> <celeriac
/> <carrot
/> <florence_fennel
/> <parsnip
/>
<parsley
/> <winter_endive
/> <witloof_chicory
/> <cardoon
/>
<artichoke
/> <head_lettuce
/> <cos_lettuce
/> <black_salsify
/>
<swedish_turnip
/> <cauliflower
/> <cabbage
/> <brussels_sprouts
/>
<kohlrabi
/> <broccoli
/> <savoy_cabbage
/> <turnip
/> <radish
/>
<water_cress
/> <garden_cress
/> <foliage_beet
/> <spinach
/>
<sweet_potato
/> <watermelon
/> <melon
/> <cucumber
/> <winter_squash
/>
<marrow
/> <chickpea
/> <lentil
/> <runner_bean
/> <common_bean
/>
<pea
/> <faba_bean
/> <leek
/> <shallot
/> <onion
/> <salsify
/>
<welsh_onion
/> <garlic
/> <chives
/> <asparagus
/> <ladyfinger
/>
<sweet_corn
/> <rhubarb
/> <capsicum_pepper
/> <tomato
/> <eggplant
/>
</dataset
>
<simplelayout
spacing
="10
"/>
<text
width
="200
" oninit
="countSubviews()
">
<handler
name
="onaddsubview
" reference
="replicationParent
">
countSubviews();
</handler
>
<method
name
="countSubviews
">
this.format("number of subviews: %d",
replicationParent.subviews.length);
</method
>
</text
>
<view
clip
="true
" width
="200
" height
="160
" id
="clipper
">
<view
id
="replicationParent
">
<view
bgcolor
="#CCCCFF
" height
="15
">
<datapath
xpath
="vegetables:/* /name()
" spacing
="5
" replication
="resize
"/>
<text
datapath
="name()
" valign
="middle
"/>
<handler
name
="onclick
">
if ( this.height != 40 ){
this.animate ( 'height', 40 , 500 );
} else {
this.animate ( 'height', 15 , 500 );
}
</handler
>
</view
>
</view
>
<scrollbar
/>
</view
>
</canvas
>
classroot, cloneManager, data, datapath, defaultplacement, id, ignoreplacement, immediateparent, inited, initstage, name, nodeLevel, options, parent, placement, styleclass, subnodes, transition
Methods
addNode, addNodeFromPointer, comparePointer, deleteNode, deleteNodeAttribute, dupePointer, getDataset, getNodeAttribute, getNodeAttributes, getNodeCount, getNodeName, getNodeText, getNodeType, getXPathIndex, isValid, selectChild, selectNext, selectParent, selectPrev, serialize, setFromPointer, setNodeAttribute, setNodeName, setNodeText, setPointer, setXPath, xpathQuery
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.