Announcement

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

    Problems with ListGrid recordComponent

    Hi Isomorphic,

    We are using Smart Client v8.3p_2013-09-17/Pro Deployment and noticing some issues with ListGrid record components and large datasets. Reproducible test case(s) is below.

    (1) When recordComponentPoolingMode is set to 'viewport,' I can see the record components fine for the records in the current view (attch:viewport pooling - initial.png), but when I scroll down enough so new pages are loaded and then scroll back up to the top, record components for a bunch of the first few records in the view are not shown anymore (attch: viewport pooling - after scrolling.png).

    (2) This problem gets resolved when I change the recordComponentPoolingMode to 'data.' However, I have another issue where the record component is drawn again when there is any sort of filter.
    After changing the pooling mode to 'data,' if I try to apply a filter in the SKU column for '45' (first record gets returned in new filter set), for example, notice that the record component text is drawn once more overlapping the original (attch: data pooling - double.png). Then when I expand the record, one of the two record components draw is still visible even when I try to hide it.

    Is it possible to have a solution where both these issues don't arise?

    Thanks.

    Code:
    <%@ taglib uri="/WEB-INF/iscTaglib.xml" prefix="isomorphic" %>
    <HTML><HEAD>
    	<isomorphic:loadISC skin="Enterprise"/>
    </HEAD>
    
    <BODY>
    <SCRIPT>
    
    <isomorphic:loadDS ID="supplyItem"/>
    
    var showRecordComponentMap = {};
    
    isc.ListGrid.create({
        ID: "itemList",
        dataSource: "supplyItem",
        leaveScrollbarGap:false, 
        height: 500,
        width: "100%",
        fields : [
            { name:"itemName" },
            { name:"SKU" },
            { name:"unitCost", width:50 },
            { name:"units", width:40 }
        ],
        recordComponentPoolingMode: "viewport",
        selectionType: "single",
        showRecordComponents: true,
    	canExpandMultipleRecords: true,
    	canExpandRecords: true,
    	showFilterEditor: true,
    	getExpansionComponent: function (record) {
    		if (record) {
    			var recordId = record.id;
    			showRecordComponentMap[recordId] = false;
    			this.displayRecordComponent(record);
    		}
    		return isc.DetailViewer.create({
    			data: record,
    			fields: [
    				{name: "itemName", title: "Name"},
    				{name: "description", title: "Description"},
    				{name: "category", title: "Category"}
    			]	
    		});		
    	},
    	displayRecordComponent: function(record) {
    		var recordNumber = this.getRecordIndex(record);
    		this.refreshRecordComponent(recordNumber);
    	},
    	createRecordComponent: function(record) {
    		var recordId = record.id;
    		if ((showRecordComponentMap[recordId] == null
    			|| showRecordComponentMap[recordId])) {
    			return isc.HTMLFlow.create({
    				autoDraw: false,
    				align: "center",
    				contents: "Record Component Text"
    			});
    		}
    	},
    	onCollapseRecord: function (record) {
    		var recordId = record.id;
    		showRecordComponentMap[recordId] = true;
    		this.displayRecordComponent(record);
    		return true;
    	}
    });
    
    itemList.fetchData();
    
    </SCRIPT>
    
    </BODY>
    </HTML>
    Attached Files

    #2
    Hi,
    This is just a quick note to let you know that this issue is currently under investigation. We'll follow up when we have more information.

    Regards
    Isomorphic Software

    Comment


      #3
      There was a framework issue in this area which was causing the recordComponents to fail to display when scrolled out of view (then back into view).

      We have made a change which we believe addresses this. Please try the next nightly build.

      Also note that we'd recommend using the "recycle" recordComponentPoolingMode if possible.
      This ensures that record components are created as needed, and, as the user scrolls around the large grid, they are automatically re-used and applied to new records that get scrolled into view, which avoids the potential for creating / leaking huge number of components (essentially one for every record the user has seen).

      Here's a simplified version of your test case which demonstrates the "recycle" pooling mode for record components:

      Code:
      isc.ListGrid.create({
          ID: "itemList",
          dataSource: "supplyItem",
          leaveScrollbarGap:false, 
          height: 500,
          width: "100%",
          fields : [
              { name:"itemName" },
              { name:"SKU" },
              { name:"unitCost", width:50 },
              { name:"units", width:40 }
          ],
          recordComponentPoolingMode: "recycle",
          selectionType: "single",
          showRecordComponents: true,
      	canExpandMultipleRecords: true,
      	showFilterEditor: true,
      	createRecordComponent: function(record) {
              return isc.HTMLFlow.create({
                  autoDraw: false,
                  border:"1px solid red",
                  align: "center",
                  // Note this will update if applied to another record
                  contents: "Record Component Text" + record.itemName
              });
      	},
      	updateRecordComponent : function (record, colNum, component, recordChanged) {
      	    if (recordChanged) {
      	        component.setContents("+Record Component Text " + record.itemName);
      	    }
      	    return component;
      	}
      });
      Let us know if you have further questions

      Regards
      Isomorphic Software

      Comment


        #4
        Thanks so much for your response and for a fix! We will try it out and let you know if there are any issues.

        We are discussing upgrading to Smart Client 9.0 from 8.3.
        Is this fix in 9.0 too? I am assuming every bug that you fix in 8.3 would be rolled into 9.0 too but wanted to check since we have other bugs we submitted in the past too that have been fixed in 8.3.

        Comment


          #5
          Looks like you might have misunderstood - there was nothing to fix in 8.3. This issue arose in 9.0 only.

          Comment


            #6
            I mentioned in my original post that we are using Smart Client v8.3p_2013-09-17/Pro Deployment and we could reproduce the issues with record pooling mode in 8.3 itself (issue (1) and (2) with the pooling mode set to 'viewport' or 'data). We are not using 9.0 yet. I assumed that you could reproduce this too in the 8.3 build provided when you responded.

            Comment


              #7
              Sorry, got mixed up between your two threads.

              Yes, this bug was fixed in 8.3 and all subsequent versions.

              Comment


                #8
                No problem. Thanks again.
                (and because of the other thread my co-worker has been following up on, we were thinking of upgrading to 9.0 and hence this question :)).

                Comment

                Working...
                X