Calendar field with text data provider

Hi,

I have a form created with solutionModel that has a field with a database text value as data provider. The type of data can differ from an integer, text or a date. Depending of the type of data the field in the form, which is created with solutionModel, can be either a Check, a Calendar or Text Field. Because at design phase I don’t know what kind of data might be, the database column where all data is saved is Text.

It used to work fine. The calendar Date values were save like this:

{"time":1290115200000,"javaClass":"java.util.Date"}

For some time I received feedbacks that the users that fill the Calendars loose the data. I checked and in the database it is saved different, and the field in the form will not read it properly after is saved first time, and when another save is made, the next time the Calendar field will not read it at all.

This is how it’s saved now:

"Mon Dec 05 08:00:00 EET 2011"

that really looks like you had a JSON Serializer/Converter attached to that field
and the second one doesn’t thats just a toString() representation of the date.

If you really want to work with text in the databases but with dates in the ui, you have to use a converter/json serializer that converts the text from the db to the actual type…