Announcement

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

    Retrieving of IN criteria not working

    When I try to retrieve the values of in criteria serverside, null is returned.

    For example this is the request:
    Code:
    == 2012-06-29 10:21:02,010 [l0-3] DEBUG XML - Parsed XML from (in memory stream): 0ms
    === 2012-06-29 10:21:02,010 [l0-3] DEBUG RPCManager - Processing 1 requests.
    === 2012-06-29 10:21:02,010 [l0-3] DEBUG RPCManager - Request #1 (DSRequest) payload: {
        criteria:{
            operator:"and",
            criteria:[
                {
                    value:[
                        224,
                        228,
                        229
                    ],
                    fieldName:"ordrPks",
                    operator:"inSet"
                }
            ],
            _constructor:"AdvancedCriteria"
        },
        operationConfig:{
            dataSource:"Schedule",
            operationType:"fetch",
            textMatchStyle:"exact"
        },
        componentId:"Schedule_GRID1340958060013",
        appID:"builtinApplication",
        operation:"Schedule_fetch",
        oldValues:{
            operator:"and",
            criteria:[
                {
                    value:[
                        224,
                        228,
                        229
                    ],
                    fieldName:"ordrPks",
                    operator:"inSet"
                }
            ],
            _constructor:"AdvancedCriteria"
        }
    }
    and this is how I tried to retrieve the values:
    Code:
    Object ordrPks = request.getAdvancedCriteria().getFieldValue("ordrPks");
    'ordrPks' is null and not an array of the given values in the request.

    This was reproduced on the latest nightly build (SmartGWT Power Edition 3.0p 2012-06-29 nightly) with FireFox 11.0

    Could you take a look into this issue? This used to work before.

    #2
    This is fixed now, download latest nightly build tomorrow and your code will get expected values.

    Till then, you can try this:
    Code:
    Criterion criterion = request.getAdvancedCriteria().asCriterion();
    Collection values = null;
    if (criterion instanceof SetCriterion) {
          values = ((SetCriterion)criterion).getValues();
    }

    Comment


      #3
      The workaround is fine for the moment, but the method "getFieldValue(String fieldName)"
      that I described in my first post is still not working to extract a fieldValue for inSet criteria in the latest build (3.0p 2012-07-09 nightly).

      Comment


        #4
        It was fixed for 3.1d. Note that getFieldValue() did not previously work for this type of Criterion 3.0p either.

        Comment


          #5
          I just fixed that in 3.0p version too. You can wait for new nightly build and check that.

          Comment

          Working...
          X