Announcement

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

    AdvancedCriteria issue in production mode

    Hi,
    Please give me a hint why it could happen. (SmartGWT 2.2)
    I create criteria with AdvancedCriteria(String fieldName, OperatorId operator, String value) construtor and use it then in grid.filterData(criteria) operator.
    In development mode I see that request contains:

    criteria {"fieldName":"extension","operator":"contains","value":"11"}
    criteria {"fieldName":"description","operator":"contains","value":"22"}

    but running the same code in production mode I see

    criteria {"fieldName":"extension","operator":"contains","value":{"0":"1","1":"1","tI":2}}
    criteria {"fieldName":"description","operator":"contains","value":{"0":"2","1":"2","tI":2}}

    #2
    What browser(s) does this happen in?

    What browsers does it not happen in?

    How are you putting together the criteria? Can you show a runnable test
    case?

    Comment


      #3
      Thank you for your attention.
      I used the FireFox 3.6.3 with FireBug 1.5.4. to inspect the request parameters.

      I found out that if I do this:
      Code:
      Object value = map.get(filedName);
      if (value != null){
        advancedCriteria = new AdvancedCriteria(filedName, operatorId, value.toString())
      then I see that strange criteria string in request.
      But if I change the last string to the following one

      Code:
      if (value instanceof String){
        advancedCriteria = new AdvancedCriteria(filedName, operatorId, (String)value); 
      }
      then I see proper "criteria" string.

      Comment


        #4
        OK, this is a known bug in GWT (not SmartGWT). We've worked around other instances of it, we'll see if similar workarounds can be applied here.

        Comment

        Working...
        X