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>
- <tree datapath="mydataset:/" showroot="false">
- <tree datapath="*" />
- </tree>
- </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 @@
<view x="10" y="10" layout="axis: x; spacing: 10">
- <basetree width="160" height="20" bgcolor="#FFFFFF"
datapath="navdata:/navmenu" />
+ <basetree width="160" height="20"
datapath="navdata:/navmenu" />
</view>
</programlisting>
@@ -700,13 +689,12 @@
tree node.
<programlisting>
- <basetree width="160" height="20" bgcolor="#FFFFFF"
datapath="navdata:/navmenu">
- <basetree width="160" height="20" bgcolor="#FFFFFF"
datapath="*" />
+ <basetree width="160" height="20"
datapath="navdata:/navmenu">
+ <basetree width="160" height="20" datapath="*" />
</basetree>
</programlisting>
</p>
-
<example title="Basetree subclass with echoed text node">
<canvas width="200" height="200">
<include href="base/basetree.lzx"/>
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>
- <tree datapath="mydataset:/" showroot="false">
- <tree datapath="*" />
- </tree>
- </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>
+ <dataset name="navdata">
+ <navmenu>
+ <section />
+ </navmenu>
+ </dataset>
+
+
+ <view x="10" y="10" layout="axis: x; spacing: 10">
+ <tree width="160" height="20"
datapath="navdata:/navmenu" />
+ </view>
+ </programlisting>
+
+ It needs to be rewritten to have a relative datapath in the
recursively expanding
+ tree node.
+
+ <programlisting>
+ <tree width="160" height="20"
datapath="navdata:/navmenu">
+ <tree width="160" height="20" datapath="*" />
+ </tree>
+ </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