History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-4666
Type: Bug Bug
Status: Verified Verified
Resolution: Fixed
Priority: P1 P1
Assignee: Unassigned
Reporter: Bret Simister
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

explicit lazyreplication fails in test file test-replicator.lzx

Created: 06/Sep/07 09:05 AM   Updated: 22/Oct/07 02:44 PM
Component/s: LFC - Data
Affects Version/s: 4.0.5WaffleCone
Fix Version/s: 4.0.5WaffleCone

Time Tracking:
Not Specified

File Attachments: None
Image Attachments:

1. explicit-lazy-replication-bug.jpg
(42 kb)

Severity: Minor
Fixed in Change#: 6,413
Runtime: N/A
Fix in hand: False


 Description  « Hide
to see the error scroll the explicit lazy replication test and notice you start to see blank lines, items out of order, and items overlapping. I have attached an image to lilustrate what I am seeing.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Henry Minsky - 07/Sep/07 08:38 AM
Hmm, more info, the bug only occurs when the container is a <list>
component; the
case where the parent is a plain old view seems to scroll fine and instantiate
the nodes in order.

See test case below: the left side window works fine, the right side
has the bug.
So it seems the <list> is trying to manage the view order and
scrolling at the same time as the replicator?

<!-- Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. -->
<canvas debug="true" proxied="false">
 <debug height="90%" width="40%" x="55%" y="5%" />

 <dataset name="testdata">
   <fibs>
     <fib value="2" />
     <fib value="3" />
     <fib value="5" />
     <fib value="8" />
     <fib value="13" />
     <fib value="21" />
     <fib value="34" />
     <fib value="55" />
     <fib value="89" />
     <fib value="144" />
     <fib value="233" />
     <fib value="377" />
     <fib value="610" />
     <fib value="987" />
     <fib value="1597" />
     <fib value="2584" />
     <fib value="4181" />
     <fib value="6765" />
     <fib value="10946" />
     <fib value="17711" />
     <fib value="28657" />
     <fib value="46368" />
     <fib value="75025" />
     <fib value="121393" />
     <fib value="196418" />
     <fib value="317811" />
     <fib value="514229" />
   </fibs>
 </dataset>

 <text multiline="true">
   Compares selection behavior across replicators where the parent is
a view (had problems with parent being a list.) Be sure to test range
selection and scrolling at various speeds.
 </text>

 <window width="20%" height="20%" x="5%" y="5%" name="explicitlazyrepltest"
         resizable="true" title="explicit lazy replicator">
   <view>
     <dataselectionmanager name="selman" id="dsel"/>
     <lazyreplicator id="elr" dataset="testdata" xpath="fibs/fib">
       <text width="100">
         <attribute name="selected" value="false"/>
         <attribute name="bgcolor"
                    value="${selected ? 0xCCDDEE : null }"/>
         <attribute name="index" value="$path{'position()'}" />
         <attribute name="value" value="$path{'@value'}" />
         <method name="applyData">
           this.format('%s: %d', this.index, this.value);
         </method>
         <handler name="onclick">
           //Debug.write(parent.selman.isSelected( this ),
parent.selman.toggle);
           parent.selman.select( this );
         </handler>
         <method name="setSelected" args="value">
           this.selected = value;
           this.onselected.sendEvent(value);
         </method>
       </text>
     </lazyreplicator>
   </view>
   <scrollbar/>
 </window>

 <window width="20%" height="20%" x="30%" y="5%"
name="explicitlazyrepltest_sel"
         resizable="true" title="explicit lazy replicator with LIST parent">
   <list width="${immediateparent.width}" height="${immediateparent.height}">
     <dataselectionmanager name="selman" id="dsel2"/>
     <lazyreplicator id="elr2" dataset="testdata" xpath="fibs/fib">
       <text width="100">
         <attribute name="selected" value="false"/>
         <attribute name="bgcolor"
                    value="${selected ? 0xCCDDEE : null }"/>
         <attribute name="index" value="$path{'position()'}" />
         <attribute name="value" value="$path{'@value'}" />
         <method name="applyData">
           this.format('%s: %d', this.index, this.value);
         </method>
         <handler name="onclick">
           Debug.write(parent.selman.isSelected( this ), parent.selman.toggle);
           parent.selman.select( this );
         </handler>
         <method name="setSelected" args="value">
           this.selected = value;
           this.onselected.sendEvent(value);
         </method>
       </text>
     </lazyreplicator>
     <!-- FIXME: [2007-08-10 ptw] (LPP-4484) -->
     <!-- NOT WORKING scrollbar id="lsb" scrolltarget="immediateparent" -->
   </list>
 </window>


</canvas>

Henry Minsky - 07/Sep/07 03:26 PM
The lazy replicator example works when the container is a view, but not a <list> component. The <list> component has it's own simplelayout, which
seems to be interfering with the lazyreplicator's placement of clones. If I comment out the simplelayout in the list component class, then the
explicit lazy replication example works with a list container.

Maybe we need a protocol for the explicit replicator to override any layout in the parent container view.


Henry Minsky - 08/Sep/07 05:40 PM
r6413 | hqm | 2007-09-08 20:22:45 -0400 (Sat, 08 Sep 2007) | 30 lines
Changed paths:
   M /openlaszlo/branches/wafflecone/lps/components/utils/replicator/lazyreplicator.lzx
   M /openlaszlo/branches/wafflecone/lps/components/utils/replicator/replicator.lzx
   M /openlaszlo/branches/wafflecone/test/explicit-replicators/floating-list.lzx
   M /openlaszlo/branches/wafflecone/test/explicit-replicators/lazy-replicator.lzx
   M /openlaszlo/branches/wafflecone/test/explicit-replicators/replicator.lzx
   M /openlaszlo/branches/wafflecone/test/explicit-replicators/selection.lzx
   M /openlaszlo/branches/wafflecone/test/explicit-replicators/test-replicator.lzx

Change 20070908-hqm-0 by hqm@IBM-2E06404CB67 on 2007-09-08 09:30:54 EDT
    in /cygdrive/c/users/hqm/openlaszlo/wafflecone3
    for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone

Summary: fix for lazyreplicator when used with list component

New Features:

Bugs Fixed: LPP-4666

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

Documentation:

Release Notes:

Details:

Take steps to disable any layouts in the container before instantiating
the clones

Note, also in this patch is changing of xpath attribute to string type (
under review in another patch)


Tests:


------------------------------------------------------------------------

Steve O'Sullivan - 22/Oct/07 02:44 PM
BAsed upon my testing, both windows draw their respective lists correctly, with no scrambling or blank lines.

Tested in build r6938, on IE7 Windows. Verified.