[Laszlo-checkins] r8802 - openlaszlo/trunk/lps/components/base

bargull@openlaszlo.org bargull at openlaszlo.org
Mon Apr 21 07:27:04 PDT 2008


Author: bargull
Date: 2008-04-21 07:27:01 -0700 (Mon, 21 Apr 2008)
New Revision: 8802

Modified:
   openlaszlo/trunk/lps/components/base/basegrid.lzx
   openlaszlo/trunk/lps/components/base/basegridcolumn.lzx
Log:
Change 20080417-bargull-4 by bargull at dell--p4--2-53 on 2008-04-17 23:40:06
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: test for replication-manager

New Features:

Bugs Fixed: LPP-5634 "Cannot sort a grid which has only a single row"

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

Documentation:

Release Notes:

Details:
Test for "LzReplicationManager" before calling replication-manager specific methods.


Tests:
from bugreport



Modified: openlaszlo/trunk/lps/components/base/basegrid.lzx
===================================================================
--- openlaszlo/trunk/lps/components/base/basegrid.lzx	2008-04-21 12:00:07 UTC (rev 8801)
+++ openlaszlo/trunk/lps/components/base/basegrid.lzx	2008-04-21 14:27:01 UTC (rev 8802)
@@ -501,12 +501,16 @@
 
         <!--- Removes the current sort if one is set, and restores the 
               original order of the dataset. -->
-        <method name="clearSort">
+        <method name="clearSort"><![CDATA[
             var repl = this._getReplicator();
-            repl.setOrder( null );
-            this._setSortCol( null );
-            repl.setXPath( repl.xpath );
-        </method>
+            if (repl != null && repl is LzReplicationManager) {
+                repl.setOrder( null );
+                this._setSortCol( null );
+                repl.setXPath( repl.xpath );
+            } else {
+                this._setSortCol( null );
+            }
+        ]]></method>
 
         <!--- @keywords private -->
         <method name="_setRowHeight" args="h">

Modified: openlaszlo/trunk/lps/components/base/basegridcolumn.lzx
===================================================================
--- openlaszlo/trunk/lps/components/base/basegridcolumn.lzx	2008-04-21 12:00:07 UTC (rev 8801)
+++ openlaszlo/trunk/lps/components/base/basegridcolumn.lzx	2008-04-21 14:27:01 UTC (rev 8802)
@@ -127,12 +127,15 @@
 
         <!--- Sorts the grid on the current column using the column's sortpath
               and ascendsort arguments. -->
-        <method name="doSort">
-            if ( sortpath == "" ) return;
-            parent._getReplicator().setOrder( sortpath , this._getSortorderArg());
+        <method name="doSort"><![CDATA[
+            if ( this.sortpath == "" ) return;
+            var repl = this.parent._getReplicator();
+            if (repl != null && repl is LzReplicationManager) {
+                repl.setOrder( this.sortpath , this._getSortorderArg() );
+            }
             this.setAttribute( "ascendsort" , !this.ascendsort );
-            parent._setSortCol( this );
-        </method>
+            this.parent._setSortCol( this );
+        ]]></method>
 
         <!--- @keywords private -->
         <method name="init">
@@ -251,7 +254,7 @@
     </class>
 </library>
 <!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * X_LZ_COPYRIGHT_END ****************************************************** -->
 <!-- @LZX_VERSION@                                                         -->



More information about the Laszlo-checkins mailing list