Author: lou
Date: 2008-02-29 08:45:16 -0800 (Fri, 29 Feb 2008)
New Revision: 8133

Modified:
   openlaszlo/trunk/lps/components/base/basetree.lzx
   openlaszlo/trunk/lps/components/lz/tree.lzx
Log:
Change 20080229-lou-a by [EMAIL PROTECTED] on 2008-02-29 12:40:09 AST
    in /Users/lou/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Document that basetree needs a relative, not absolute datapath

Bugs Fixed: LPP-4603

Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)

Details: This was inadvertently documented twice. Remove the duplicate 
documentation.
    

Tests: visual verify



Modified: openlaszlo/trunk/lps/components/base/basetree.lzx
===================================================================
--- openlaszlo/trunk/lps/components/base/basetree.lzx   2008-02-29 16:44:18 UTC 
(rev 8132)
+++ openlaszlo/trunk/lps/components/base/basetree.lzx   2008-02-29 16:45:16 UTC 
(rev 8133)
@@ -655,17 +655,6 @@
             should be placed in <varname>item</varname>. You can use
             <code>placement="item"</code>. The <varname>children</varname> 
view is
             the defaultplacement for basetree.</p>
-              
-              <p>Note that a data replicated tree passes its XPath
-                  <!--link--> down to its subtrees, so avoid specifying an 
absolute XPath
-                  such as "<code>mydataset:/*</code>" or your tree will 
infinite
-                  loop. Instead, use a relative XPath:</p>
-              
-              <programlisting>
-                  &lt;tree datapath="mydataset:/" showroot="false"&gt;
-                  &lt;tree datapath="*" /&gt;
-                  &lt;/tree&gt;
-              </programlisting>
             
             <p>The following diagram demonstrates how <varname>item</varname> 
and
             <varname>children</varname> are associated in tree. Since
@@ -676,7 +665,7 @@
             <img src="images/basetree/basetree-diagram.png"/>
             
             <p>
-              When the basetree expands recursively, the datapath must be
+              When the <classname>basetree</classname> expands recursively, 
the datapath must be
               a relative reference to the dataset. If an absolute
               refrence is used, the same nodes would be selected over
               and over forever, resulting in and endless loop.
@@ -692,7 +681,7 @@
 
 
               &lt;view x="10" y="10" layout="axis: x; spacing: 10"&gt;
-                &lt;basetree width="160" height="20" bgcolor="#FFFFFF" 
datapath="navdata:/navmenu" /&gt;
+                &lt;basetree width="160" height="20" 
datapath="navdata:/navmenu" /&gt;
               &lt;/view&gt;
               </programlisting>
 
@@ -700,13 +689,12 @@
               tree node. 
 
               <programlisting>
-                &lt;basetree width="160" height="20" bgcolor="#FFFFFF" 
datapath="navdata:/navmenu"&gt;
-                  &lt;basetree width="160" height="20" bgcolor="#FFFFFF" 
datapath="*" /&gt;
+                &lt;basetree width="160" height="20" 
datapath="navdata:/navmenu"&gt;
+                  &lt;basetree width="160" height="20" datapath="*" /&gt;
                 &lt;/basetree&gt;
               </programlisting>
             </p>
 
-
             <example title="Basetree subclass with echoed text node">
             &lt;canvas width="200" height="200"&gt;
               &lt;include href="base/basetree.lzx"/&gt;

Modified: openlaszlo/trunk/lps/components/lz/tree.lzx
===================================================================
--- openlaszlo/trunk/lps/components/lz/tree.lzx 2008-02-29 16:44:18 UTC (rev 
8132)
+++ openlaszlo/trunk/lps/components/lz/tree.lzx 2008-02-29 16:45:16 UTC (rev 
8133)
@@ -143,16 +143,36 @@
               specified lexically or through data replication
               <!--link-->.</p>
 
-              <p>Note that a data replicated tree passes its XPath
-                  <!--link--> down to its subtrees, so avoid specifying an 
absolute XPath
-                  such as "<code>mydataset:/*</code>" or your tree will 
infinite
-                  loop. Instead, use a relative XPath:</p>
-              
-              <programlisting>
-                  &lt;tree datapath="mydataset:/" showroot="false"&gt;
-                  &lt;tree datapath="*" /&gt;
-                  &lt;/tree&gt;
-              </programlisting>
+              <p>
+                  When the <classname>tree</classname> expands recursively, 
the datapath must be
+                  a relative reference to the dataset. If an absolute
+                  refrence is used, the same nodes would be selected over
+                  and over forever, resulting in and endless loop.
+                  
+                  For example, this will hang in an endless loop: 
+                  
+                  <programlisting>
+                      &lt;dataset name="navdata"&gt;
+                      &lt;navmenu&gt;
+                      &lt;section /&gt;
+                      &lt;/navmenu&gt;
+                      &lt;/dataset&gt;
+                      
+                      
+                      &lt;view x="10" y="10" layout="axis: x; spacing: 10"&gt;
+                      &lt;tree width="160" height="20" 
datapath="navdata:/navmenu" /&gt;
+                      &lt;/view&gt;
+                  </programlisting>
+                  
+                  It needs to be rewritten to have a relative datapath in the 
recursively expanding
+                  tree node. 
+                  
+                  <programlisting>
+                      &lt;tree width="160" height="20" 
datapath="navdata:/navmenu"&gt;
+                      &lt;tree width="160" height="20" datapath="*" /&gt;
+                      &lt;/tree&gt;
+                  </programlisting>
+              </p>
 
             <p>Each resource, if specified, should have three states. The 
expander resource
               should have an open (frame 1), closed (frame 2), and transparent 
(frame 3)


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

Reply via email to