Announcement

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

    clientOnly DataSource

    I create a DataSource with the client Only = true property set, but for some reason this DataSource overloads the data again after some time. I tried to set canSyncCache = false, but it didn't help. How do I disable the new data load?

    Version SNAPSHOT_v13.1d_2024-11-07/Pro Deployment

    #2
    The clientOnly setting doesn't do this. Please provide more information - the Debugging topic in the SmartClient Reference may help you to figure out what you need to provide to make it possible to help you.

    Comment


      #3
      I am creating a DataSource with the following parameters
      Code:
      {
          "ID": "usersData",
          "clientOnly": true,
          "dataURL": "api/users.json?react=true&r=3257112226158867&project=",
          "fields": [
              {
                  "name": "@id",
                  "type": "text",
                  "primaryKey": true,
                  "title": "User ID"
              },
              {
                  "name": "type",
                  "type": "text",
                  "title": "Type"
              },
              {
                  "name": "@_name",
                  "type": "text",
                  "title": "Login name"
              },
              {
                  "name": "firstname",
                  "type": "allowedText",
                  "title": "First name"
              },
              {
                  "name": "lastname",
                  "type": "allowedText",
                  "title": "Surname"
              },
              {
                  "name": "fullName",
                  "type": "allowedText",
                  "title": "Name"
              }
          ]
      }
      before reloading the data, the console outputs the following

      Code:
      *10:51:51.519:TMR8:INFO:ResultSet:isc_ResultSet_3 (dataSource: usersData, created by: isc_Function_6):Received 25 records from server
      ISC_Core.js:1475 *10:51:51.520:TMR8:DEBUG:ResultSet:isc_ResultSet_3 (dataSource: usersData, created by: isc_Function_6):full length set to: 100, progressiveLoading?:false
      ISC_Core.js:1475 *10:51:51.520:TMR8:DEBUG:ResultSet:isc_ResultSet_3 (dataSource: usersData, created by: isc_Function_6):integrating 25 rows into cache at position 75
      ISC_Core.js:1475 *10:51:51.520:TMR8:INFO:ResultSet:isc_ResultSet_3 (dataSource: usersData, created by: isc_Function_6):Fetch request returned range 75,100 differs from requested range 75,150. Assuming client/server batch size mismatch and clearing loading markers greater than 100
      ISC_Core.js:1475 *10:51:51.521:TMR8:INFO:ResultSet:isc_ResultSet_3 (dataSource: usersData, created by: isc_Function_6):cached 25 rows, from 75 to 100 (100 total rows, 100 cached)
      ISC_Core.js:1475 *10:51:51.521:TMR8:INFO:ResultSet:isc_ResultSet_3 (dataSource: usersData, created by: isc_Function_6):Cache for entire DataSource complete
      ISC_Core.js:1475 *10:51:51.522:TMR8:INFO:ResultSet:isc_ResultSet_3 (dataSource: usersData, created by: isc_Function_6):finishClientSort: sorting on properties [@_name] : directions [true] : full cache allows local sort
      
      ....
      ....
      ISC_Core.js:1475 *10:51:51.526:TMR9:DEBUG:ResultSet:isc_ResultSet_3 (dataSource: usersData, created by: isc_Function_6):getRange(0, 100) satisfied from cache
      *10:53:05.205:MUP8:INFO:ResultSet:isc_ResultSet_9 (dataSource: usersData, created by: isc_Function_9):setCriteria: filter criteria changed, invalidating cache
      ISC_Core.js:1475 *10:53:05.206:MUP8:INFO:ResultSet:isc_ResultSet_9 (dataSource: usersData, created by: isc_Function_9):Invalidating cache
      ISC_Core.js:1475 *10:53:05.209:MUP8:INFO:ResultSet:isc_ResultSet_9 (dataSource: usersData, created by: isc_Function_9):doClientSort: sorting on properties [] : directions [] : invalidating cache
      ISC_Core.js:1475 *10:53:05.209:MUP8:INFO:ResultSet:isc_ResultSet_9 (dataSource: usersData, created by: isc_Function_9):Invalidating cache
      ISC_Core.js:1475 *10:53:05.211:MUP8:DEBUG:ResultSet:isc_ResultSet_9 (dataSource: usersData, created by: isc_Function_9):getRange(0,62), cache check: 0,67 firstMissingRow: 0 lastMissingRow: 67
      ISC_Core.js:1475 *10:53:05.211:MUP8:DEBUG:ResultSet:isc_ResultSet_9 (dataSource: usersData, created by: isc_Function_9):getRange: guessing forward scrolling
      ISC_Core.js:1475 *10:53:05.212:MUP8:INFO:ResultSet:isc_ResultSet_9 (dataSource: usersData, created by: isc_Function_9):getRange(0, 62) will fetch from 0 to 75
      ISC_Core.js:1475 *10:53:05.212:MUP8:INFO:ResultSet:isc_ResultSet_9 (dataSource: usersData, created by: isc_Function_9):fetching rows 0,75 from server
      ISC_Core.js:1475 *10:53:05.222:MUP8:INFO:RPCManager:sendQueue[12]: 1 RPCRequest(s); transport: xmlHttpRequest; target: api/users.json?react=true&r=3257112226158867&project=
      ISC_Core.js:1475 *10:53:05.226:MUP8:DEBUG:RPCManager:XMLHttpRequest GET from api/users.json?react=true&r=3257112226158867&project= with fields: {} full URL string: api/users.json?react=true&r=3257112226158867&project=
      ISC_Core.js:1475
      PS
      Maybe it matters... I have the same DataSource used in multiple ListGrid
      Last edited by Hirn; 25 Nov 2024, 03:22.

      Comment


        #4
        There is a property, cacheAllData=true, that causes reloads if you also set cacheMaxAge.

        Other than that, a clientOnly DataSource will not automatically reload unless you explicitly tell it to, so, this is clearly not enough information for anyone to help you - please revisit the Debugging topic.

        Comment

        Working...
        X