Announcement

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

    Passing back a Map with a key fo type Date in RPC?

    I am making a RPC call and included in the response is a HashMap that has Date objects as keys. All the data is being stripped out and in the smartgwt.log I see these messages:

    <b>Ignoring unconvertible Map key of type: java.util.Date</b>

    Is there any reason I am not allowed to set over a Map with the keys being a Date object?
    Last edited by stonebranch1; 2 Apr 2014, 06:34.

    #2
    JavaScript Object keys are always Strings, and just calling toString() on your Date is probably not the result you want, so we warn instead.

    Comment


      #3
      OK, thanks. I just wanted to confirm that.

      I am just formatting the date as String and then creating a Date object on the client as needed from that String using the same formatting.

      Thanks.

      Comment

      Working...
      X