Announcement

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

    Change in behvaiour of marshalling of date fields.

    I upgraded smartclient from v8.2 to v8.3. I see the date fields marshalling has been changed. In 8.2, the date fields were marshalling as
    Code:
    value:{ 
        firstDayOfWeek:1, 
        gregorianChange:new Date(-12219292800000),
        lenient:true, minimalDaysInFirstWeek:1,
        time:new Date(1393891200000),
        timeInMillis:1393891200000,
        timeZone: {
              DSTSavings:0,ID:"",
              displayName:"GMT+00:00",rawOffset:0}
        }
    }
    In 8.3 it is simply being marshalled as
    Code:
    value:new Date(1393891200000)
    Can you please confirm the change? Also is there anyway I can force 8.2 type of marshalling for date fields?

    As I have some custom javascript code built on 8.2 marhsalling, the code is not working as the value does not have lots of properties and resulting in javascript error.

    Appreciate your response on this. Thanks.

    #2
    There's been no change in Date serialization.

    The format you're showing looks like you were actually serializing a Calendar - no specific format for this was even documented, but it does now serialize as a simple "new Date()" value instead of using the default handling of treating it as a generic Java bean.

    If you need the old serialization for some reason, look at JSTranslator.toJS() for documentation on how to customize serialization.

    Comment


      #3
      Yes you are right, it's a calendar object on the server side. I think I have to change my custom code on the client side.

      Comment

      Working...
      X