Announcement

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

    Java specific Date Constructor HTTP request

    Bug or feature?

    I am using a DataSourceDateField in a ListGrid, and I use a RestDataSource to access the Python based server on Google App Engine

    Upon analyzing HTTP traffic I stumbled upon this:

    Code:
    POST /com.figurous.gwt.Application/data/dataIntegration/json/country_update_rest.json HTTP/1.1
    
    Host: localhost:8888
    
    User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920
    
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    
    Accept-Language: en-us,en;q=0.5
    
    Accept-Encoding: gzip,deflate
    
    Accept-Charset: UTF-8,*
    
    Keep-Alive: 300
    
    Connection: keep-alive
    
    Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    
    Content-Length: 234
    
    Pragma: no-cache
    
    Cache-Control: no-cache
    
    
    
    entityId=100&eanCode=1234567890120&_operationType=update&_oldValues=%7BentityId%3A%22100%22%2CcreationDate%3Anew%20Date(1211996383000)%2CeanCode%3A%221234567890123%22%2Ccomment%3A%22c%22%7D&_componentId=isc_OID_4&_dataSource=isc_OID_3
    Please note that the client sends "new Date(1211996383000)" to the server, effectively assuming that the server speaks Java (or, god forbid, javascript).

    Would you mind elaborating on what to expect when receiving the data to a non-java server.
    Last edited by Peter Odéus; 9 Jan 2009, 02:20.

    #2
    You're seeing that only within the oldValues, and it's basically a matter of SmartGWT having to do something reasonable with an HTTP param where an object was passed as the param value. The right approach, if you want oldValues to be reasonably transmitted, is to use a dataProtocol of "postMessage" for the "update" operationType. In that case you'll get dates in XML Schema standard format.

    Comment

    Working...
    X