Author: lou
Date: 2008-03-10 09:26:43 -0700 (Mon, 10 Mar 2008)
New Revision: 8215
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs
Log:
Change 20080310-lou-B by [EMAIL PROTECTED] on 2008-03-10 12:20:11 AST
in /Users/lou/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: include intro paragraphs and example code from 3.4 to the
dataselectionmanager page of the reference.
New Features:
Bugs Fixed: LPP-5569 (partial)
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)
Details:
there are still problems with the name of the page and the short
description.
Tests: visual verify
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs
2008-03-10 16:24:33 UTC (rev 8214)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs
2008-03-10 16:26:43 UTC (rev 8215)
@@ -1,6 +1,6 @@
/**
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @affects lzdataselectionmanager
@@ -8,15 +8,64 @@
* @topic LFC
* @subtopic Helpers
* @lzxname dataselectionmanager
+ * @shortdesc A selection manager for views generated by a lazily-replicated
datapath
*/
/**
- * Implements same functionality as a normal selection manager, but without
- * storing view references, which become invalid as views created by a
datapath
- * that uses lazy replication do. Does this by storing subview numbers.
- *
- */
-
+ * <p>If a datapath's <classname>datapath.replication</classname> attribute
is set to "lazy", then a match to
+ * multiple nodes will create an
<classname>LzLazyReplicationManager</classname> instead of an
<classname>LzReplicationManager</classname>.
+ * 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.
+ * </p>
+ * <p>
+ * With lazy replication you must use a <classname>LzDataSelectionManager
</classname>instead of a <classname>LzSelectionManager</classname>.
+ * The <classname>LzDataSelectionManager</classname> 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 <classname>LzDataSelectionManager</classname>
operating on it.
+ * </p>
+ * <p>As with a LzSelectionManager, ctrl-click will select multiple items and
shift-click will
+ * select a range. To modify this behavior, you can extend the
<classname>LzDataSelectionManager</classname> and implement
+ * <method>isRangeSelect</method> and <method>isMultiSelect</method>.</p>
+ * <example class="program" id="datasenectionmgr">
+ * <canvas width="200" 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>sailbaot</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">
+ if (isselected) setAttribute('bgcolor', yellow);
+ else setAttribute('bgcolor', white);
+ * </method>
+ * </class>
+
+ * <view height="70" clip="true">
+ * <view>
+ * <dataselectionmanager name="selector"/>
+ * <selectme>
+ * <datapath xpath="mydata:/list/item/" replication="lazy"/>
+ * </selectme>
+ * <simplelayout/>
+ * </view>
+ * <scrollbar/>
+ * </view>
+ * </canvas>
+ * </example>
+ */
+
class LzDataSelectionManager extends LzSelectionManager {
/** @access private
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins