Announcement

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

    Setting autoCacheAllData causes optional request params to be ignored

    In SmartGWT 2.5/GWT 2.3, I have a working datasource object that retrieves data from the server just fine. I can check the dev console and see the XML request and response and everything is good. I am setting optional fetch request parameters with the 3 argument call to DataSource.fetchData. As soon as I set this datasource to autoCacheAllData=true, the optional fetch request parameters are ignored making the server call stop working. If I comment out the autoCacheAllData=true, it works again.

    The exact same thing happens if I use clientOnly=true instead, the optional fetch request parameters is not used. Is this a bug?

    #2
    I am also using a RestDataSource and my issue seems very similar to thread topic 17243 from deepfriedbrain. That issue was resolved. If my issue is the same, then perhaps smartGWT 2.5 has regressed this bug? Basically, setting cacheAllData=true or clientOnly=true or autoCacheAllData=true changes how the fetch works and ignores my optional fetch parameters when using the 3 argument DataSource.fetchData()

    Comment


      #3
      The request initiates to cache all data is a special request that drops all criteria so that all records are returned. This is by design.

      Comment


        #4
        I am not using any criteria. In the 3 argument DataSource.fetchData call, I set the criteria to null, my own class as the DSCallback, and a DSRequest object with my extra HTTP parameters. It is this last argument DSRequest, that is being dropped. This last argument DSRequest contains extra HTTP parameters needed by my servlet to respond with the correct information. I can understand the design to drop the criteria, but not the DSRequest object that may contain HTTP parameters.

        Comment


          #5
          Are the parameters really criteria in disguise? If so, they should be dropped. If they are truly not criteria, set them via dataURL.

          Comment

          Working...
          X