Announcement

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

    Some display issues after 5.1 upgrade

    Hello and happy new year!

    I had an existing application using SmartGWT 5.0 (2015.11.20 nightly build to be precise).
    To fix some known issues, I'm now trying to upgrade to SmartGWT 5.1 (I get 2016.12.19 nightly build). I've changed my lib references, rebuilt and redeployed my application. Everything goes well until... I try to display any data : the interface is diplayed but there is no data.
    The first screens of my app contains only a listGrid. These grids are databound to any datasource. I see the request and the complete answer (with several data) when I watch the network content but the list displays only "No item to show".
    Up to now, I cannot understand why.
    What did I do wrong? Do I forgot some configuration? Has something changed on data binding between the versions?
    Any clue to help me to investigate the problem can be useful...
    Last edited by MelieZxy; 5 Jan 2017, 08:25.

    #2
    Hi MelieZxy,

    generally speaking, this should just work. But it does not. You did not give enough information to analyse/guess, though.
    • Are there any Developer Console errors?
    • Are there any JS errors in the browser's F12 tools?
    • Do you see the RPC/DSRequest in the RPC Tab? What does it look like (use [ code ] tags here in your answer)
    • Do you see the RPC/DSResponse in the RPC Tab? What does it look like (use [ code ] tags here in your answer)
    Best regards
    Blama

    Comment


      #3
      Hi @Blama,

      Thanks for your reply.

      Here are some add-ons:
      - I use either firefox latest version with SmartClient Dev Console (ven if my target version is 38.2.1 ESR) or Chrome most recent version with SuperDevMode ans Chrome Dev tools (on Windows 7)
      - Whatever the browser, there is no error in any console.
      - In the RPC tab of Smart Dev Console, I see the requests. For instance, a DSRequest :
      Code:
      {
          dataSource:"isc_DataSourceFactory_1_0",
          operationType:"fetch",
          componentId:"CommercialChannelListViewGrid",
          data:"{\n    \"dataSource\":\"isc_DataSourceFactory_1_0\", \n    \"operationType\":\"fetch\", \n    \"startRow\":0, \n    \"endRow\":75, \n    \"textMatchStyle\":\"exact\", \n    \"componentId\":\"CommercialChannelListViewGrid\", \n    \"data\":{\n    }, \n    \"oldValues\":null\n}",
          startRow:0,
          endRow:75,
          textMatchStyle:"exact",
          resultSet:[ResultSet ID:isc_ResultSet_0 (dataSource: isc_DataSourceFactory_1_0, created by: CommercialChannelListViewGrid)],
          callback:{
              caller:[ResultSet ID:isc_ResultSet_0 (dataSource: isc_DataSourceFactory_1_0, created by: CommercialChannelListViewGrid)],
              methodName:"fetchRemoteDataReply"
          },
          willHandleError:true,
          showPrompt:true,
          prompt:"Finding Records that match your criteria...",
          requestId:"isc_DataSourceFactory_1_0$6270",
          internalClientContext:{
              requestIndex:1
          },
          fallbackToEval:false,
          dataFetchMode:"paged",
          lastClientEventThreadCode:"MUP0",
          httpMethod:"POST",
          bypassCache:true,
          dataProtocol:"postMessage",
          isRestRequest:true,
          dataFormat:"json",
          contentType:"application/json"
      }
      And the answer (I truncate manually the list for easier reading, there are actually 75 results returned) :
      Code:
      {
        "response" : {
          "status" : 0,
          "startRow" : 0,
          "endRow" : 75,
          "totalRows" : 1189,
          "data" : [ {
            "id" : 1,
            "catvLabel" : "CCFF"
          }, {
            "id" : 2,
            "img_1294801318" : null,
            "catvLabel" : "TEST2",
            "img_1305492819" : null
          }, {
            "id" : 4,
            "img_1294801318" : null,
            "catvLabel" : "CJ",
            "img_1305492819" : null
          }, {
            "id" : 6,
            "catvLabel" : "CCC"
          }, {
            "id" : 158,
            "catvLabel" : "EXP1"
          }, {
            "id" : 160,
            "catvLabel" : "EXP2"
          }, {
            "id" : 162,
            "catvLabel" : "EXP3"
          }, {
            "id" : 164,
            "catvLabel" : "EXP4"
          }, {
            "id" : 166,
            "catvLabel" : "EXP 5"
          }, {
            "id" : 168,
            "catvLabel" : "EXP 6"
          }, {
            "id" : 170,
            "catvLabel" : "EXP 7"
          }, {
            "id" : 172,
            "catvLabel" : "EXP 8"
          }, {
            "id" : 174,
            "catvLabel" : "EXP 9"
          } ],
          "userPreferences" : [ {
            "id" : 1,
            "login" : "catv_dev",
            "tableId" : "CommercialChannelListViewGrid",
            "viewState" : "({field:[{name:\"catvLabel\"},{name:\"img_1294801318\"},{name:\"img_1305492819\"},{name:\"img_1294800977\"},{name:\"img_1305493160\"}]})",
            "screenType" : "COMMERCIAL_CHANNEL_LIST"
          }, {
            "id" : 10,
            "login" : "catv_dev",
            "tableId" : "AttachCommercialChannelViewGrid",
            "viewState" : "({selected:[{id:19802}],field:[{name:\"catvLabel\"},{name:\"img_1294801318\"},{name:\"img_1305492819\"},{name:\"img_1294800977\"},{name:\"img_1305493160\"}]})",
            "screenType" : "ATTACH_COMMERCIAL_CHANNEL_VIEW_POPUP"
          } ]
        }
      }
      At first sight, these look the same as before the version upgrade.

      Comment


        #4
        I have a new clue!
        When putting a breakpoint and debugging in my fetchData() callback, I found that the received DSResponse is not the expected object but "The server failed to return a formatted response at all."
        I don't understand this issue because the server seem to answer well.
        Does anyone have an idea of what is the problem or where does it come from?

        Comment


          #5
          With the error message, I found a related (very old) post and tried the suggested solution.
          So I've added setJsonPrefix("") and setJsonSuffix("") on my RestDataSource and now it works. \o/

          I think the 5.1 version is less permissive than previous...
          Now I'll be able to check if my app needs some adjustments to work with the new version and if the bugs are fixed with it.

          Comment

          Working...
          X