Announcement

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

    Major problem (for us) - DataSource.setDefaultParams() not sent to server anymore

    smartgwtpro5.0

    Hello. Our app is ancient, in IT-terms, it harkens back to smartgwt3 at least...

    We have a couple of places where we have a user component that sets filter on certain grids. When that happens, the way we enforce the filter and make sure that the parameters are sent to the server is like this:
    Code:
     DSRequest props = new DSRequest();
    props.setWillHandleError(true);
    
    Criteria c = dateChooser.assembleCriteria();
    
    ds.setDefaultParams(c.getValues());
    clearFilters();
    
    grid.setData(CommonConstants.[I]EMPTY_DATA[/I]);
    grid.fetchData(null, runReportCallback, props);
    The reason for this is, if i remember correctly, that back when it was coded, it was no good way to simply send criteria as part of the request, they were simply ignored, but this worked. And has worked for years.


    HOWEVER, today i tried upgrading smartgwtpro5.0 from 20150906, where it still worked, to 20151005. Running that version, the 'defaultparams' no longer seem to be passed on to the server, there are no criteria in the dsrequest.


    I actually did some legwork for you, and downloaded each day backwards, and the LAST day that it works is 20150918, it breaks on the September 19 build.


    Is this somehow a known change? I hope not... thankful for feedback!

    Cheers

    #2
    This is a known bugfix. setDefaultParams should never have placed params into the criteria. What it is documented to do is to set HTTP paramters in the URL. It now does this in all modes.

    There's a lot of ways to set criteria on grids, or add them at the DataSource level (via operationBindings). You need to switch to one of those, as you've been relying on a bug - setDefaultParams() is documented to do something totally different from what you want.

    Comment


      #3
      Haha, well in that case you certainly took your time fixing it! :) OK i'll look into it.

      Comment

      Working...
      X