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">
+  * &lt;canvas width="200" height="200"&gt;
+  *   &lt;dataset name="mydata"&gt;
+  *     &lt;list&gt;
+  *       &lt;item&gt;tricycle&lt;/item&gt;
+  *       &lt;item&gt;train&lt;/item&gt;
+  *       &lt;item&gt;racecar&lt;/item&gt;
+  *       &lt;item&gt;scooter&lt;/item&gt;
+  *       &lt;item&gt;bicycle&lt;/item&gt;
+  *       &lt;item&gt;rollerblades&lt;/item&gt;
+  *       &lt;item&gt;iceskates&lt;/item&gt;
+  *       &lt;item&gt;minivan&lt;/item&gt;
+  *       &lt;item&gt;sailbaot&lt;/item&gt;
+  *       &lt;item&gt;motorboat&lt;/item&gt;
+  *     &lt;/list&gt;
+  *   &lt;/dataset&gt;
+        
+  *   &lt;class name="selectme" onclick="immediateparent.selector.select(this)"
+        height="17" width="100" bgcolor="white"&gt;
+  *     &lt;text datapath="text()"/&gt;
+  *     &lt;method name="setSelected" args="isselected"&gt;
+        if (isselected) setAttribute('bgcolor', yellow);
+        else setAttribute('bgcolor', white);
+  *     &lt;/method&gt;
+  *   &lt;/class&gt;
+        
+  *   &lt;view height="70" clip="true"&gt;
+  *     &lt;view&gt;
+  *       &lt;dataselectionmanager name="selector"/&gt;
+  *       &lt;selectme&gt;
+  *         &lt;datapath xpath="mydata:/list/item/" replication="lazy"/&gt;
+  *       &lt;/selectme&gt;
+  *       &lt;simplelayout/&gt;
+  *     &lt;/view&gt;
+  *     &lt;scrollbar/&gt;
+  *     &lt;/view&gt;
+  * &lt;/canvas&gt;
+    * </example>
+    */
+    
 class LzDataSelectionManager extends LzSelectionManager {
 
 /** @access private


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to