Announcement

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

    Issue with DateRange in Criteria

    Hi Isomorphic,

    I have upgraded SC "SmartClient Version: 8.1/Enterprise Development Only (built 2011-08-02)" to "SmartClient Version: v8.2p_2013-06-15/Enterprise Development Only (built 2013-06-15)" .

    Whenvever there is only DateRange in the Criteria, I am getting the below exception :

    Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to org.apache.commons.collections.map.LinkedMap.

    If there will be more criteria, dsRequest.getCriteria().get("criteria") returning colleciton of LinkedMap otherwise returning collection of HashMap.



    Plese let me know how to fix the issue.


    FYI,


    Below is the request :

    *Only DateRange in Criteria*

    data":{
    "operator":"and",
    "criteria":[
    {
    "operator":"and",
    "criteria":[
    {
    "fieldName":"workOrderDate",
    "operator":"greaterOrEqual",
    "value":"2013-07-02T07:50:00"
    },
    {
    "fieldName":"workOrderDate",
    "operator":"lessOrEqual",
    "value":"2013-07-17T18:29:00"
    }
    ]
    }
    ]
    }


    *One more field in criteria with DateRange or no Date Range*

    1) With DateRange
    "data":{
    "operator":"and",
    "criteria":[
    {
    "fieldName":"status",
    "operator":"equals",
    "value":"Unassigned"
    },
    {
    "fieldName":"workOrderDate",
    "operator":"greaterOrEqual",
    "value":"2013-07-02T07:50:00"
    },
    {
    "fieldName":"workOrderDate",
    "operator":"lessOrEqual",
    "value":"2013-07-17T18:29:00"
    }
    ]
    },



    2) No Date Range
    "data":{
    "operator":"and",
    "criteria":[
    {
    "fieldName":"status",
    "operator":"equals",
    "value":"Unassigned"
    }
    ]
    },

    #2
    Please show the complete server log for failing request (always do this for any server issue).

    Comment


      #3
      Attached the server log which is having diffrent request mentioned beofre.

      Also found some issue while providing From and To in Date Range input and again view the value, it changed.

      Attached the sceenshot.

      Step :
      1) Select DateRange and provide the From and To Date. By default the From Date time start from 00:00 and To Datetime 23:59.

      2) Again click on the icon to see the date provided, From Date changed based on the brower timezone.

      The From date should be same whatever provided before.


      FYI, I have customized the isc.Date.setInputFormat(...)
      Attached Files

      Comment


        #4
        This server log doesn't contain the Exception you claimed you are seeing (or indeed any Exceptions) so it's useless for troubleshooting this issue.

        It doesn't make sense to upgrade from 8.1 to 8.2 when 8.3 has been available for a long time, and we are recommending a move to the pending 9.0 now.

        Please update to an appropriate version and let us know whether you're experiencing issues, but if you do continue to experience issues, be sure to provide the necessary diagnostics.

        Comment


          #5
          Thanks Isomorphic !!!

          We have a generic code to get the Criteria from Map and process that criteria.

          As mentioned , the criteria object is not consistent and getting different criteria list. I have laready mentioned the Request sent by SC. The criterial Object should have same type of collection. The Exception occurrred in our application due to the non-consistent behaviour of SC criteria.

          Also, DateRange Input box having different behavior and have attached the screenshot before. Please let me know how to fix.
          Last edited by spant; 4 Jul 2013, 04:07.

          Comment


            #6
            So it's your own code crashing? Take a look at API on dsRequest such as getCriteriaValue() to avoid relying on a particular criteria structure. The criteria structure will (validly) vary.

            And again, please test on a recent release regarding the other issue.

            Comment


              #7
              I have updated SmartClient Version: v8.2p_2013-06-15/Enterprise Development Only (built 2013-06-15) and evaluating it.

              New version also having the same issue. We can manupulate the Criteria but seems DateRange Input having the issue.


              Please let me know how to fix the issue of DateRange input value.

              Pelase see the attached image SelectDateRange.GIF and test cases mentioned before.

              Thanks !!!

              Comment


                #8
                Please re-read previous response:

                1. criteria format is expected to vary, we've indicated how to correct your code

                2. need to update to 8.3 or later, not just a more recent nightly of 8.2

                Comment

                Working...
                X