Hi Friends,
I did a model class and view with date show in grid and form, the codes were as below.
Model Code:
{ name: 'createdDate', type: 'date', dateFormat:'time' //dateformat: 'd/m/Y' },
My values are show properly in the grid and form.On Save submit, i alert also showing correctly.
My control code:
var form = button.up('form'),
record = form.getRecord(),
formValues = form.getValues(false,false,false,true);
if (form.getForm().isValid()) {
if (record.phantom === true) {
store.add(formValues); }
else { record.set(formValues);
if(record)
console.log('update organization request for '+record.get('organizationId')); a
lert(record.get('createdDate')); } }
if(record.get('organizationId') == '0') {
if(record) console.log('insert organization request for '+record.get('organizationId'));
this.getStrOrganizationStore().insert(0, record); }
this.getStrOrganizationStore().sync();
on calling i check the JSON content, it as follows:{"organizationId":1,"organizationName":"RadLink Diagnostic Imaging (S) Pte Ltd","description":"","countryId":1,"telephoneNumber":"6836 0808","faxNumber":"6836 8484","createdDate":"300009e","activeStatus":false,"remarks":"Specialized in Radiology","id":null}
i'm getting createdDate as '300009e' also i don't have id field its also padded last, my idProperty: 'organizationId',
onsubmit server reports as follow 'The request sent by the client was syntactically incorrect.'
Showing the date in grid and form were fine, but when submitting the form the JSON looks like the following.
{"id":1,"organizationName":"Diagnostic Imaging (S) Pte Ltd","description":"","countryId":1,"telephoneNumber":"6836 0808","faxNumber":"6836 8484","createdDate":"310001e","activeStatus":false,"remarks":"Specialized in Radiology"}
here the date is the problem, "createdDate": "310001e"
in my server i'm getting the error as "The request sent by the client was syntactically incorrect"
Kindly somebody help me, its really appreciated.
thanks & regards
kumar