Author: ptw
Date: 2007-08-22 05:48:23 -0700 (Wed, 22 Aug 2007)
New Revision: 6181

Added:
   openlaszlo/branches/wafflecone/test/explicit-replicators/floating-list.lzx
Removed:
   openlaszlo/branches/wafflecone/test/replicators/
Modified:
   
openlaszlo/branches/wafflecone/lps/components/utils/replicator/lazyreplicator.lzx
   openlaszlo/branches/wafflecone/lps/components/utils/replicator/replicator.lzx
   openlaszlo/branches/wafflecone/test/explicit-replicators/lazy-replicator.lzx
   openlaszlo/branches/wafflecone/test/explicit-replicators/test-replicator.lzx
Log:
Change 20070821-ptw-e by [EMAIL PROTECTED] on 2007-08-21 16:28:27 EDT
    in /Users/ptw/OpenLaszlo/wafflecone
    for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone

Summary: Allow overriding container and mask for explicit replicator

Bugs Fixed:
LPP-4544 'Ability to override default container and mask views for explicit 
replicator'

Submitted on behalf of: pkang
Technical Reviewer: ptw (pending)
QA Reviewer: mamye (pending)

Details:
    Removed old tests.  Added new floating-list test from Pablo.
    Updated test-replicators (side-by-side test) to actually show
    implicit lazy replication.

    Exposed `container` (defaults to replicator immediateparent) and
    `mask` (defaults to container immediateparent) attributes of
    replicator so that Pablo can override them in subclasses.

Tests:
    test/explicit-replicators/*



Modified: 
openlaszlo/branches/wafflecone/lps/components/utils/replicator/lazyreplicator.lzx
===================================================================
--- 
openlaszlo/branches/wafflecone/lps/components/utils/replicator/lazyreplicator.lzx
   2007-08-22 12:46:52 UTC (rev 6180)
+++ 
openlaszlo/branches/wafflecone/lps/components/utils/replicator/lazyreplicator.lzx
   2007-08-22 12:48:23 UTC (rev 6181)
@@ -35,8 +35,6 @@
         super.construct( p, a );
         this.__emptyArray = [];
         this.clonedel = new LzDelegate( this, '__adjustVisibleClones');
-        this.mask = this.parent.parent;
-        this.container = this.parent;
     }
 
     //  @keywords private

Modified: 
openlaszlo/branches/wafflecone/lps/components/utils/replicator/replicator.lzx
===================================================================
--- 
openlaszlo/branches/wafflecone/lps/components/utils/replicator/replicator.lzx   
    2007-08-22 12:46:52 UTC (rev 6180)
+++ 
openlaszlo/branches/wafflecone/lps/components/utils/replicator/replicator.lzx   
    2007-08-22 12:48:23 UTC (rev 6181)
@@ -25,6 +25,12 @@
     <!--- A pixel amount to use between each replicated view -->
     <attribute name="spacing" value="0" />
 
+    <!--- The view that will contain the replicated nodes.  Defaults to the 
immediateparent of the replicator. -->
+    <attribute name="container" />
+
+    <!--- The view that will clip the replicated nodes.  Defaults to the 
immediateparent of the container -->
+    <attribute name="mask" />
+
     <!--- The list of elements controlled by this repliator -->
     <attribute name="clones" />
 
@@ -122,13 +128,13 @@
         this._cloneprops = [];
         this._clonepool = [];
         super.construct.apply(this, arguments);
+        this.container = this.immediateparent;
+        this.mask = this.container.immediateparent;
     }
 
     // @keywords private
     function init() {
       super.init.apply(this, arguments);
-      // Set the layout in the view that will hold the replicated views
-//      this.immediateparent.setAttribute('layout', {axis: this.axis, spacing: 
this.spacing});
       if (this.dataset && this.xpath) {
         this.setNodes(this.dataset.getPointer().xpathQuery(this.xpath))
       }
@@ -141,7 +147,7 @@
         //Debug.write( 'replicated', replicated );
         if ( c.length ) {
           Debug.warn("%s: only a single child view is replicated", this);
-          this.immediateparent.createChildren( c );
+          this.container.createChildren( c );
         } else {
           this.__LZinstantiationDone();
         }
@@ -240,7 +246,7 @@
 
     //  @keywords private
     function _makeClone () {
-        var v = this.immediateparent.makeChild( this.replicated );
+        var v = this.container.makeChild( this.replicated );
         v.setAttribute( "clonenumber", null );
         return v;
     }

Added: 
openlaszlo/branches/wafflecone/test/explicit-replicators/floating-list.lzx


Property changes on: 
openlaszlo/branches/wafflecone/test/explicit-replicators/floating-list.lzx
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Modified: 
openlaszlo/branches/wafflecone/test/explicit-replicators/lazy-replicator.lzx
===================================================================
--- 
openlaszlo/branches/wafflecone/test/explicit-replicators/lazy-replicator.lzx    
    2007-08-22 12:46:52 UTC (rev 6180)
+++ 
openlaszlo/branches/wafflecone/test/explicit-replicators/lazy-replicator.lzx    
    2007-08-22 12:48:23 UTC (rev 6181)
@@ -1,5 +1,5 @@
 <canvas debug="true" proxied="false">
-    <debug x="200" y="0" height="100%" fontsize="16"/>
+    <debug x="50%" y="5%" height="90%" />
 
     <dataset name="mydata">
       <product name="vanilla" color="1 white"/>

Modified: 
openlaszlo/branches/wafflecone/test/explicit-replicators/test-replicator.lzx
===================================================================
--- 
openlaszlo/branches/wafflecone/test/explicit-replicators/test-replicator.lzx    
    2007-08-22 12:46:52 UTC (rev 6180)
+++ 
openlaszlo/branches/wafflecone/test/explicit-replicators/test-replicator.lzx    
    2007-08-22 12:48:23 UTC (rev 6181)
@@ -65,9 +65,10 @@
 
   <window width="20%" height="20%" x="30%" y="5%" name="implicitlazyrepltest"
           resizable="true" title="implicit lazy replicator">
-    <list width="${immediateparent.width}" height="${immediateparent.height}">
+    <list width="${immediateparent.width}" height="${immediateparent.height}" >
       <selectionmanager name="selman" />
-      <text width="100" id="ilr" datapath="testdata:/fibs/fib">
+      <text width="100" id="ilr">
+        <datapath xpath="testdata:/fibs/fib" replication="lazy" />
         <attribute name="selected" value="false"/>
         <attribute name="bgcolor"
                    value="${('selected' in this &amp;&amp; this.selected) ? 
0xCCDDEE : null }"/>


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

Reply via email to