I'm integrating with a non-servlet webservice and am having some trouble with Date and Time values and a RestDatasource. Are these fully implemented?
It would be fantastic if you had an example of this working in the showcase (ie, include a "time", "date" and "datetime" in this example: http://www.smartclient.com/smartgwt/...ategory_simple or this one http://www.smartclient.com/smartgwt/...ation_category
My understanding (please correct if I'm wrong) is the preferred way to transmit a "time" is with a string such as "09:21:00" and a "datetime" as a GMT formatted string such as "2012-03-18T09:21:00".
This works fine with ListGrid components and DynamicForms. However, when I try and directly update a record without going through these Form/Grid components, it seems like the conversion logic has not been applied to the Record and the value stored in the Record is a String "09:21:00" - which will crash if I call getAsDateAttribute. If I do the same operation on a value that has been edited by a DynamicForm then the value returned is a Date.
Now, I am able to get my Record to work as expected if I return a time as "new Date(12312412)" - which is not legal JSON (it is executable javascript). This works great for most things. But then I hit the Timezone issue. a "time" is stored on the client as a javascript Date with the time in localtime. This causes a headache because the I need to know the client's Timezone - also seems like a pretty horrid hack compared to returning a String.
It would be fantastic if you had an example of this working in the showcase (ie, include a "time", "date" and "datetime" in this example: http://www.smartclient.com/smartgwt/...ategory_simple or this one http://www.smartclient.com/smartgwt/...ation_category
My understanding (please correct if I'm wrong) is the preferred way to transmit a "time" is with a string such as "09:21:00" and a "datetime" as a GMT formatted string such as "2012-03-18T09:21:00".
This works fine with ListGrid components and DynamicForms. However, when I try and directly update a record without going through these Form/Grid components, it seems like the conversion logic has not been applied to the Record and the value stored in the Record is a String "09:21:00" - which will crash if I call getAsDateAttribute. If I do the same operation on a value that has been edited by a DynamicForm then the value returned is a Date.
Now, I am able to get my Record to work as expected if I return a time as "new Date(12312412)" - which is not legal JSON (it is executable javascript). This works great for most things. But then I hit the Timezone issue. a "time" is stored on the client as a javascript Date with the time in localtime. This causes a headache because the I need to know the client's Timezone - also seems like a pretty horrid hack compared to returning a String.
Comment