Announcement

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

    Pagination Issue in DropDown

    1. The DSRequest has one attribute by the name of startRow. The first request that is fired has startRow=0 and the default batch size is 75 rows.
    So the response contains 75 records. The consecutive DSRequest comes with startRow=75. Fetches another set of records starting from 75 to batchSize.
    But the 3rd DSRequest that is fired has startRow=0 which force fetches the data from 0th row to 75 rows. Which results in the comboBox to blink continuosly.

    2. Ideally the startRow attribute should be updated accordingly so that the records that are fetched are not repeated and thus do not cause re fetching of data,
    thus avoiding the blinking of dropdown.

    3. The efforts made in order to rectify this problem which did not work:
    a) setting dataPageSize attribute to 25.
    b) setting sqlPaging attribute to true.
    c) Since the pagination fails after 2 requests, hence we set the batchSize = 1000. But for the cases where data is more than 1000 rows, it is still failing.

    4. Also, the DSResponse is set adequately after each fetch operation, i.e.,
    the endRow / startRow attributes are set adequately. Also the totalRows attributes are set accordingly.

    The request is keep firing since it is unable to identify start and end rows properly.

    #2
    You can see many samples where this doesn't happen, and we also have several dozen automated tests showing various advanced use cases working fine, so please let us know how you got this to happen and how to reproduce the claimed problem.

    If you can find a way for others to reproduce the problem, before posting again, make sure to try it against the latest patched build, and to report the product and version you're using, as well as what browser(s) are affected. This information is always required when posting about issues.

    Comment


      #3

      We have recently migrated from Smartclient 8.0 power edition to Smartclient 12.0 power edition, pagination was working perfectly in Smartclient 8.0 power edition, the same code is not working in Smartclient 12.0 power edition (below is the code)

      Even I have checked few samples (Hello World Program and one for dynamicForm) in Smartclient 12.o showcase and SDK as well, it is working perfectly.

      Product Affected Version : Smartclient 12.0 power edition
      Affected Browser : Google Chrome, Edge and Internet Explorer.

      We are calling the below function.

      currencyCode: function() {
      return {name:"currencyCode", width:100, title:"Currency Code", editorType:"comboBox", optionDataSource:"dropDownDD", valueField:"value",pickListHeight: getPickListHeight(),pickListWidth:150,
      getPickListFilterCriteria : function () {
      try{
      if(isMouseClicked()) {
      return populateDropDown(getValueForField(this.form,fieldName),"Currency","CurrencyCode",['%%']);
      }
      else {
      return populateDropDown(getValueForField(this.form,fieldName),"Currency","CurrencyCode",[getValueForField(this.form,fieldName).toUpperCase()+'%']);
      }
      }catch(e){
      return populateDropDown("%%","Currency","CurrencyCode",['%%']);
      }
      }
      }
      }

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

      /**
      ** Generic method to populate dropdown
      */
      function populateDropDown(frmFieldValue,tokenSubType,tokenColName,queryParams,tokenType,productTypeCode,productSubTypeCode,chargeTypeCode,chargeSubTypeCode, isCreator,module){
      var selectedMenuname = selectedTabName();

      return {
      //dataParams:{tokenType:'GUI',tokenSubType:tokenSubType,tokenColumnName:tokenColName},
      dataParams:getDataParams(tokenType,tokenSubType,tokenColName,module,productTypeCode,productSubTypeCode,chargeTypeCode,chargeSubTypeCode),
      queryParams:queryParams,
      minChars:3,
      paramVal:frmFieldValue,
      menuName:selectedMenuname,
      creator:isCreator
      };
      }

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

      dropDownDD.ds.xml

      <DataSource
      ID="dropDownDD"
      serverConstructor="com.cs.examin.gui.smartclient.datasource.DropDownDataSource"
      mappedBeanClass="com.cs.examin.dataobject.common.NamedValue"
      dropExtraFields="true"
      >
      <fields>
      <field name="name" />
      <field name="value" />

      </fields>
      </DataSource>

      Comment


        #4
        Most of the time, when people say something went around on upgrade, it's a usage issue, and their code should not have worked in the old version either.

        There's nothing obviously wrong with your code here.

        You haven't reported whether you've tried the latest patched build.

        Let us know if you can find a way to reproduce the problem.

        Comment


          #5
          I have not tried in the latest patched version.

          I am using 12.0p_2020-08-08/PowerEdition Deployment (built 2020-08-08), I am able to reproduce the problem here.

          I need to apply the solution in above version. I completely agree it is working fine in Hello World program.

          Comment


            #6
            Please let us know if you can find a way for anyone else to reproduce the problem.

            As things stand, we have the framework samples, many many automated tests, and many many other developers all showing this is working fine, and you alone are claiming there’s a problem, which you have not provided a way to reproduce.

            So, obviously there is nothing further than can be done for you at this point.

            Comment

            Working...
            X