Announcement

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

    Databound Combobox fetches all pages

    We have a Databound Combobox backed by a Datasource that supports paging. When the user opens the List or enters something the Combox is not only fetching the first page but it is going to load all pages. This is very bad because we could have thousends of items. The Datasource works fine with listgrids and paging as excpected.

    The small example below is uses only the SmartClient skin and runs with the current Version (SmartClient_v110p_2016-11-03_Pro).

    Code:
      var stack = isc.VStack.create(
      {
        members :
        [
          isc.DynamicForm.create(
          {
            width : 400,
            numCols : 2,
            fields :
            [
              {
                name : "product",
                width : "*",
                titleAlign : "left",
                required : true,
                editorType : isc.ComboBoxItem,
                optionDataSource : isc.DataSource.create(
                {
                  ID : "ProductPicker$Pos",
                  fields :
                  [
                    {
                      name : "name",
                      type : "text"
                    },
                    {
                      name : "identity",
                      type : "text"
                    }
                  ]
                }),
                displayField : "name",
                valueField : "identity",
                type : "text",
                title : "Product"
              }
            ]
          })
        ]
      });
    Attached are the two first Requests/Responses and some Debug-Log from developper console
    Attached Files

    #2
    We can't run your test case, but if it is minimally modified to use a sample DataSource, there's no issue like you describe. Which is unsurprising, since if this were really happening, thousands of our automated tests would be failing and the forums would be swamped with duplicate reports.

    Best guess is that you have globally modified a setting such as comboBoxItem.filterLocally, which forces all rows to be fetched in advance.

    Comment


      #3
      The problem was the datasource returning totalRows only a few rolws more than the last returned row. It seems that the datasource must set totalRows to at least 200 more than the last returned row to prevent fetching the next page. This is a bit bad, if the user scrolls down a little bit there will be one or more fetches. I prefer the user having to scroll down almost to the end of the list before the next fetsch will occur.

      Comment

      Working...
      X