Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    Hi Isomorphic,

    I just tried to reproduce the case where I had different behaviour in different browsers and was not able to do so. I don't know what happened or what I think I saw :(

    One more question regarding the automatic enabling of VirtualScrolling:
    Originally posted by the updated docs, http://www.smartclient.com/smartgwtee-latest/javadoc/com/smartgwt/client/widgets/grid/ListGrid.html#getVirtualScrolling%28%29
    virtualScrolling is switched on automatically when fixedRecordHeights is false and also when using the recordComponents subsystem, as recordComponents expand the rows that contain them.
    Is this still true when I use ListGrid.setRecordComponentHeight()? The size should be known then, shouldn't it?
    Or the other way around: Is it somehow possible not to have VirtualScrolling when using showRecordComponents(true)?

    My ListGrid configuration is:
    • setShowRecordComponents(true);
    • setShowRecordComponentsByCell(true);
    • setRecordComponentPoolingMode(RecordComponentPoolingMode.RECYCLE);
    • setPoolComponentsPerColumn(true);
    • setFixedRecordHeights(true)
    • setCellHeight(30)
    • setHeaderHeight(35)
    • setRecordComponentHeight(22)
    • setCanGroupBy(true)
    • setDataSource(...)
    • setGroupByField("...")


    Can (or should) this configuration lead to a ListGrid without VirtualScrolling?

    Thank you & Best regards,
    Blama

    Comment


      #17
      Hi Isomorphic,

      I have an error in this area again. Most likely the same one. v10.0p_2015-07-15/PowerEdition Deployment is working fine. Today's SNAPSHOT_v10.1d_2015-07-29/PowerEdition Deployment shows the following effect (possibly older versions as well):

      The grid seems to have more rows than it actually has (the scrollbar allows approx for one extra page of blank entries).
      When I scroll the (grouped) ListGrid with the mousewheel or by dragging the scrollbar, the ListGrid jumps to the top again. It works with scrolling with the arrow keys.
      Once I reach the empty area with the arrow keys, scrolling with the mousewheel or by dragging the scrollbar is working again (like the old report!).
      It does not happen with v10.0p_2015-07-15 because this does not display the "empty page" in the first place.
      I'm using a custom Simplicity based skin. It happens at least in GC44, FF26, IE11.

      It would be great if this could be analysed with Development Mode logs only, because I'm pretty sure it will be difficult to reproduce. A quick test with normal Simplicity and a plain ListGrid does not show the effect.
      My ListGrid is configured as follows:
      Code:
      		setAutoFetchData(false);
      		setShowFilterEditor(false);
      		setShowRecordComponents(true);
      		setShowRecordComponentsByCell(true);
      		setRecordComponentPoolingMode(RecordComponentPoolingMode.RECYCLE);
      		setPoolComponentsPerColumn(true);
      		setRecordComponentHeight(22);
      		setCanGroupBy(false);
      		setCanReorderFields(true);
      		setGroupStartOpen(GroupStartOpen.ALL);
      		setSortByGroupFirst(true);
      I can provide a screencast video (suggested in this thread) if needed and all Development Mode logs.

      Most important question (and easiest possible solution) is:
      Did the fix from #14 make it into 5.1d as well (if 5.1d was already started at that time, 24th Jul 2014)?

      Best regards
      Blama

      Comment


        #18
        Yes, the fix is already in 10.1d.

        We don't really follow the description of what's wrong with scrolling. It seems very unlikely that one mode of scrolling would have issues while another would not, so please test at least one other machine.

        And we'll definitely need a test case for a weird issue like this - possibly a screenshot as well, unless you can clarify your comments on scrolling.

        Comment


          #19
          Hi Isomorphic,

          sorry, I meant "Development Console logs" all the time I wrote "Development Mode logs".

          But I was able to create an easy BuiltInDS+Simplicity-based testcase, showing all the symptoms mentioned (using SNAPSHOT_v10.1d_2015-07-29):
          • Not able to scroll down with mousewheel or scrollbar-dragging or Page-Down key (always jumps to old position again)
          • Able to scroll down with arrow keys
          • Able to scroll down a bit with mousewheel or scrollbar-dragging after scrolling before with arrow keys
          • Empty page in the end (see screenshot)
          • Reproducible in FF26, GC44, IE11


          BuiltInDS.java
          Code:
          package com.smartgwt.sample.client;
          
          import com.google.gwt.core.client.EntryPoint;
          import com.smartgwt.client.core.KeyIdentifier;
          import com.smartgwt.client.data.DataSource;
          import com.smartgwt.client.types.AutoFitWidthApproach;
          import com.smartgwt.client.types.GroupStartOpen;
          import com.smartgwt.client.types.RecordComponentPoolingMode;
          import com.smartgwt.client.util.PageKeyHandler;
          import com.smartgwt.client.util.Page;
          import com.smartgwt.client.util.SC;
          import com.smartgwt.client.widgets.IButton;
          import com.smartgwt.client.widgets.events.ClickEvent;
          import com.smartgwt.client.widgets.events.ClickHandler;
          import com.smartgwt.client.widgets.grid.ListGrid;
          import com.smartgwt.client.widgets.layout.HLayout;
          import com.smartgwt.client.widgets.layout.VLayout;
          
          public class BuiltInDS implements EntryPoint {
          	private VLayout vL;
          	private TestGrid tG1;
          	private HLayout hL;
          
          	public void onModuleLoad() {
          		setListGridDefaultApperance();
          		KeyIdentifier debugKey = new KeyIdentifier();
          		debugKey.setCtrlKey(true);
          		debugKey.setKeyName("D");
          
          		Page.registerKey(debugKey, new PageKeyHandler() {
          			public void execute(String keyName) {
          				SC.showConsole();
          			}
          		});
          
          		vL = new VLayout(5);
          		vL.setPadding(20);
          		vL.setWidth100();
          		vL.setHeight100();
          		tG1 = new TestGrid("employees");
          
          		hL = new HLayout(5);
          		hL.setHeight(40);
          		IButton reloadBtn = new IButton("Reload");
          		reloadBtn.setWidth(150);
          		reloadBtn.addClickHandler(new ClickHandler() {
          			@Override
          			public void onClick(ClickEvent event) {
          				vL.removeChild(tG1);
          				tG1.markForDestroy();
          				tG1 = new TestGrid("employees");
          				vL.addMember(tG1, 0);
          			}
          		});
          
          		hL.addMembers(reloadBtn);
          		vL.addMembers(tG1, hL);
          		vL.draw();
          	}
          
          	private class TestGrid extends ListGrid {
          		public TestGrid(String mode) {
          			super();
          			setShowFilterEditor(true);
          			setDataSource(DataSource.get(mode));
          			setAutoFetchData(false);
          			setAutoFetchData(false);
          			setShowFilterEditor(false);
          			setShowRecordComponents(true);
          			setShowRecordComponentsByCell(true);
          			setRecordComponentPoolingMode(RecordComponentPoolingMode.RECYCLE);
          			setPoolComponentsPerColumn(true);
          			setRecordComponentHeight(22);
          			setCanGroupBy(false);
          			setCanReorderFields(true);
          			setGroupStartOpen(GroupStartOpen.ALL);
          			setSortByGroupFirst(true);
          			fetchData();
          		}
          	}
          	
          	private static void setListGridDefaultApperance() {
          		ListGrid lg = new ListGrid() {
          			{
          				setAutoFitFieldsFillViewport(true);
          				setShowClippedValuesOnHover(true);
          				setAutoFitWidthApproach(AutoFitWidthApproach.VALUE);
          				setCanMultiGroup(false);
          				setCanEdit(false);
          				setShowFilterEditor(false);
          				setCanFreezeFields(false);
          				setCanReorderFields(false);
          				setCellHeight(30);
          				setHeaderHeight(35);
          				setFixedRecordHeights(true);
          				setGroupIconSize(30);
          				setGroupLeadingIndent(0);
          				setHoverDelay(500);
          			}
          		};
          		ListGrid.setDefaultProperties(lg);
          	}
          }
          BuiltInDS.html
          Code:
          <!DOCTYPE html>
          <html>
          <head>
          <meta http-equiv="content-type" content="text/html; charset=UTF-8">
          <title>BuiltInDS</title>
          <script>
          	var isomorphicDir = "builtinds/sc/";
          </script>
          <script type="text/javascript" src="builtinds/sc/modules/ISC_Core.js"></script>
          <script type="text/javascript" src="builtinds/sc/modules/ISC_Foundation.js"></script>
          <script type="text/javascript" src="builtinds/sc/modules/ISC_Containers.js"></script>
          <script type="text/javascript" src="builtinds/sc/modules/ISC_Grids.js"></script>
          <script type="text/javascript" src="builtinds/sc/modules/ISC_Forms.js"></script>
          <script type="text/javascript" src="builtinds/sc/modules/ISC_DataBinding.js"></script>
          <script type="text/javascript" src="builtinds/sc/skins/Simplicity/load_skin.js"></script>
          <script type="text/javascript" src="builtinds/builtinds.nocache.js"></script>
          </head>
          <body>
          	<script src="builtinds/sc/DataSourceLoader?dataSource=supplyItem,animals,employees"></script>
          	<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1'
          		style="position: absolute; width: 0; height: 0; border: 0"></iframe>
          </body>
          </html>
          BuiltInDS.gwt.xml
          Code:
          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
             "http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
          <module rename-to="builtinds">
          	<inherits name="com.google.gwt.user.User" />
          	<inherits name="com.smartgwt.tools.SmartGwtTools" />
          	<inherits name="com.smartgwtee.SmartGwtEENoScript" />
          	<inherits name="com.smartgwtee.tools.Tools" />
          	<inherits name="com.smartclient.theme.simplicity.SimplicityResources" />
          	
              <!-- Uncomment lines below for GWT Super Dev Mode Support:
                 - both lines needed for GWT < 2.6, only the first line needed for GWT < 2.7
                 - see http://www.smartclient.com/docs/release/a/b/c/go.html#group..debugging -->
              <!-- <add-linker name="xsiframe" />                                             -->
              <!-- <set-configuration-property name="devModeRedirectEnabled" value="true" />  -->
          
              <!-- Uncomment lines below for GWT "stack emulation" with file/line number info -->
              <!-- <set-property               name="compiler.stackMode"  value="emulated" /> -->
              <!-- <set-configuration-property name="compiler.emulatedStack.recordFileNames"
                                               value="true" />                                -->
              <!-- <set-configuration-property name="compiler.emulatedStack.recordLineNumbers"
                                               value="true" />                                -->
          
          	<entry-point class='com.smartgwt.sample.client.BuiltInDS' />
          </module>
          Best regards
          Blama
          Attached Files
          Last edited by Blama; 30 Jul 2015, 06:13. Reason: Added SmartGWT version, removed unnecessary groupBy

          Comment


            #20
            We see the "jumping" problem you refer to and are looking into it, but the blank space at the bottom is a normal consequence of the fact that the virtual scrolling subsystem has been activated (due to the use of record components). See http://www.smartclient.com/smartgwt/...crolling%28%29.

            You should not be able to scroll the last row completely out of view, though. When scrolled to the bottom extrema, the last row should still be visible at the top.

            Comment


              #21
              Hi Isomorphic,

              please see this revised testcase, which makes testing a bit more easy.

              BuiltInDS.java
              Code:
              package com.smartgwt.sample.client;
              
              import com.google.gwt.core.client.EntryPoint;
              import com.smartgwt.client.core.KeyIdentifier;
              import com.smartgwt.client.data.AdvancedCriteria;
              import com.smartgwt.client.data.Criterion;
              import com.smartgwt.client.data.DSCallback;
              import com.smartgwt.client.data.DSRequest;
              import com.smartgwt.client.data.DSResponse;
              import com.smartgwt.client.data.DataSource;
              import com.smartgwt.client.types.AutoFitWidthApproach;
              import com.smartgwt.client.types.GroupStartOpen;
              import com.smartgwt.client.types.OperatorId;
              import com.smartgwt.client.types.RecordComponentPoolingMode;
              import com.smartgwt.client.util.PageKeyHandler;
              import com.smartgwt.client.util.Page;
              import com.smartgwt.client.util.SC;
              import com.smartgwt.client.widgets.IButton;
              import com.smartgwt.client.widgets.events.ClickEvent;
              import com.smartgwt.client.widgets.events.ClickHandler;
              import com.smartgwt.client.widgets.form.DynamicForm;
              import com.smartgwt.client.widgets.form.fields.BooleanItem;
              import com.smartgwt.client.widgets.form.fields.TextItem;
              import com.smartgwt.client.widgets.grid.ListGrid;
              import com.smartgwt.client.widgets.layout.HLayout;
              import com.smartgwt.client.widgets.layout.VLayout;
              
              public class BuiltInDS implements EntryPoint {
              	private VLayout vL;
              	private TestGrid tG;
              	private HLayout hL;
              	DynamicForm dF;
              
              	public void onModuleLoad() {
              		setListGridDefaultApperance();
              		KeyIdentifier debugKey = new KeyIdentifier();
              		debugKey.setCtrlKey(true);
              		debugKey.setKeyName("D");
              
              		Page.registerKey(debugKey, new PageKeyHandler() {
              			public void execute(String keyName) {
              				SC.showConsole();
              			}
              		});
              
              		vL = new VLayout(5);
              		vL.setPadding(20);
              		vL.setWidth100();
              		vL.setHeight100();
              		tG = new TestGrid("A", false);
              
              		hL = new HLayout(5);
              		hL.setHeight(40);
              
              		dF = new DynamicForm();
              		dF.setNumCols(4);
              		TextItem startLetter = new TextItem("startLetter", "Start letter");
              		BooleanItem groupBy = new BooleanItem("groupBy", "Group by gender");
              		dF.setFields(startLetter, groupBy);
              
              		IButton reloadBtn = new IButton("Reload ?-Z");
              		reloadBtn.setWidth(150);
              		reloadBtn.addClickHandler(new ClickHandler() {
              			@Override
              			public void onClick(ClickEvent event) {
              				vL.removeChild(tG);
              				tG.markForDestroy();
              				Object startLetterObj = dF.getValue("startLetter");
              				Object groupByObj = dF.getValue("groupBy");
              				boolean groupBy = false;
              				if (groupByObj != null)
              					groupBy = (Boolean) groupByObj;
              
              				if (startLetterObj != null)
              					tG = new TestGrid(startLetterObj.toString(), groupBy);
              				else
              					tG = new TestGrid("A", groupBy);
              				vL.addMember(tG, 0);
              			}
              		});
              
              		hL.addMembers(dF, reloadBtn);
              		vL.addMembers(tG, hL);
              		vL.draw();
              	}
              
              	private class TestGrid extends ListGrid {
              		public TestGrid(String greaterThan, boolean groupBy) {
              			super();
              			setShowFilterEditor(true);
              			setDataSource(DataSource.get("employees"));
              			setAutoFetchData(false);
              			setAutoFetchData(false);
              			setShowFilterEditor(false);
              			setShowRecordComponents(true);
              			setShowRecordComponentsByCell(true);
              			setRecordComponentPoolingMode(RecordComponentPoolingMode.RECYCLE);
              			setPoolComponentsPerColumn(true);
              			setRecordComponentHeight(22);
              			setCanGroupBy(false);
              			setCanReorderFields(true);
              			setGroupStartOpen(GroupStartOpen.ALL);
              			setSortByGroupFirst(true);
              			setSortField("Name");
              			if (groupBy)
              				setGroupByField("Gender");
              			fetchData(new AdvancedCriteria(new Criterion("Name", OperatorId.GREATER_OR_EQUAL, greaterThan)), new DSCallback() {
              				@Override
              				public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) {
              					SC.say("Using VirtualScrolling: '" + getVirtualScrolling() + "'");
              				}
              			});
              		}
              	}
              
              	private static void setListGridDefaultApperance() {
              		ListGrid lg = new ListGrid() {
              			{
              				setAutoFitFieldsFillViewport(true);
              				setShowClippedValuesOnHover(true);
              				setAutoFitWidthApproach(AutoFitWidthApproach.VALUE);
              				setCanGroupBy(true);
              				setCanMultiGroup(false);
              				setCanEdit(false);
              				setShowFilterEditor(false);
              				setCanFreezeFields(false);
              				setCanReorderFields(false);
              				setCellHeight(30);
              				setHeaderHeight(35);
              				setFixedRecordHeights(true);
              				setGroupIconSize(30);
              				setGroupLeadingIndent(0);
              				setHoverDelay(500);
              			}
              		};
              		ListGrid.setDefaultProperties(lg);
              	}
              }

              Originally posted by Isomorphic View Post
              You should not be able to scroll the last row completely out of view, though. When scrolled to the bottom extrema, the last row should still be visible at the top.
              Please see the attached screenshot. It happens for me. I did not understand if you can reproduce or not?


              Originally posted by Blama View Post
              Is this still true when I use ListGrid.setRecordComponentHeight()? The size should be known then, shouldn't it?
              Or the other way around: Is it somehow possible not to have VirtualScrolling when using showRecordComponents(true)?
              Could you please answer this old question from #16? This becomes important because of the following:
              • Using SNAPSHOT_v10.1d_2015-07-29 I do have the "total empty page"-problem on startup.
              • Using SNAPSHOT_v10.1d_2015-07-29 I do not have the "total empty page"-problem and "jumping"-problem when reloading "L-Z". The Popup still says "VirtualScrolling: true", though.
                I do have the problem with more entries (e.g. "K-Z"). Note: On start with my browser (1920x1080 minus browser UI) I can see "Christian Jeansonne" as last visible entry.
              • When I resize the browser window to make it smaller in height, I get the "jumping"-problem as well as the "total empty page"-problem also when reloading "L-Z" (therefore perhaps drawAheadRatio related?).
              • This is true for v10.0p_2015-07-30 as well. No difference between 5.0p and 5.1d at all. Actually also the "jumping" happens with v10.0p_2015-07-30. I did not report that before.


              As sidenote: I do have the ListGrid grouped in my application, but this does not seem to matter here.

              Best regards
              Blama
              Attached Files
              Last edited by Blama; 31 Jul 2015, 02:20.

              Comment


                #22
                We've made an adjustment to the logic that detects virtual scrolling which should fix the issues you've encountered. The fix will be in SGWT 5.0p and newer in the nightlies dated 08-06-2015.

                Comment


                  #23
                  Hi Isomorphic,

                  thanks, I'll test with the testcase and in my app and let you know.
                  Does this fix the "jumping"-bug and the "fully empty page"-bug?
                  Or does it circumvent those bugs by not using virtual scrolling because virtual scrolling is not necessary when using setRecordComponentHeight()+ListGrid.showRecordComponents(true)?

                  Best regards
                  Blama

                  Comment


                    #24
                    Hi Isomorphic,

                    I retested with 5.0p v10.0p_2015-08-06/PowerEdition Deployment (I did not test 5.1d, yet).

                    It seems to work in GC44, FF26 (using virtual scrolling, but the "jumping"-bug is gone and if scrolled down totally, the last record is still fully visible, so the "fully empty page"-bug is gone as well).

                    This is also true for IE11, but here there is another (new) problem, when scrolling down totally:
                    1. I used the same testcase ("Christian Jeansonne" as last visible entry for me)
                    2. Select 1st record
                    3. Hit "Page down"-button 4x ("Whitney Rogers" as last visible entry for me at the very bottom)
                    4. Hit "Page down"-button one more time.
                    5. "Whitney Rogers" only visible entry on the very top. Scrollbar-knob resizes to minimal size.

                    Alternative: If I scroll to the very bottom with scrollknob-dragging, the Scrollbar-knob is completely gone, as are the up/down arrows at the end of the scrollbar (see screenshot).

                    The fix helps me very much, but you might want to look into this nevertheless.

                    Best regards
                    Blama
                    Attached Files

                    Comment


                      #25
                      Hi Isomorphic,

                      SNAPSHOT_v10.1d_2015-08-06 behaves the same for me like current 5.0p.

                      Best regards
                      Blama
                      Last edited by Blama; 6 Aug 2015, 07:36. Reason: EDIT: Both bugs present in the same manner in 5.0p, 5.1d.

                      Comment


                        #26
                        Originally posted by Blama View Post

                        The fix helps me very much, but you might want to look into this nevertheless.

                        Best regards
                        Blama
                        Are the remaining issues only visible in IE11?

                        Comment


                          #27
                          Hi Isomorphic,

                          yes, only IE11 (I did not test other IE versions).

                          Best regards
                          Blama

                          Comment


                            #28
                            We're making a fix for the IE11 issues in SGWT 5.0p and newer that will be in the builds marked 2015-08-11.

                            Comment


                              #29
                              Hi Isomorphic,

                              I retested with the same test case as before (using Simplicity and java code from #21) and v10.0p_2015-08-16/PowerEdition Deployment.

                              The result for IE11/Win8.1 did not change. The same bugs are still present ("Scrollbar-knob resizes to minimal size", "Scrollbar-knob is completely gone, as are the up/down arrows at the end of the scrollbar").

                              Actually, also for FF26 and GC44 the "Scrollbar-knob resizes to minimal size" is present to when doing fast scrollknob-dragging to the very bottom of the scrollbar.

                              Best regards
                              Blama

                              Comment


                                #30
                                We've ported additional files for SGWT 5.0p (it should be working for SGWT 5.1d as is). This should be in the nightly builds for 2015-08-18.

                                Comment

                                Working...
                                X