I have extended two fields in TaskForm Cost and Actual Cost. I did following
// add some custom field
this.add({
fieldLabel: 'Cost',
name: 'Cost',
width: 200
});
// defined it in the model
Ext.define('Gnt.examples.advanced.model.Task', {
extend : 'Gnt.model.Task',
fields : [
{ name : 'index', type : 'int', persist : true },
{ name : 'expanded', type : 'bool', persist : true },
{ name : 'Color', type : 'string' },
{ name: 'ShowInTimeline', type: 'bool' },
{ name: 'Cost', type: 'string' },
{ name: 'ActualCost ', type: 'string' }
],
showInTimelineField : 'ShowInTimeline'
});
but when i pass some value for cost via TaskForm it is not passed to Json. Json has the property Cost but returning empty to the backend. How i can bind this field with model ?
my second issue is , if i create bool field, i will not get checkbox. always it is textbox with showing the value 'false'. i need a checkbox for that. the same data bind always having here.
/ add some custom field
this.add({
fieldLabel: 'Is Check',
name: 'IsCheck',
width: 200
});
also defined in the model
fields : [
{ name : 'index', type : 'int', persist : true },
{ name : 'expanded', type : 'bool', persist : true },
{ name : 'Color', type : 'string' },
{ name: 'ShowInTimeline', type: 'bool' },
{ name: 'Cost', type: 'string' },
{ name: 'ActualCost ', type: 'string' },
{ name: 'IsCheck', type: 'bool' }
],
How can i fix those issues?
Support Forum
Hello,
I am having same problem as Jay, I added a new field BaselineDuration that behaves as duration of my baselineStart and my baselineEnd. Its value changes and it is displayed correctly but when i wanna save the new value, it is not passed to Json i always see it as null. I dont know how to bind its value with the model.
How could i fix it ?
Thanks,
I am having same problem as Jay, I added a new field BaselineDuration that behaves as duration of my baselineStart and my baselineEnd. Its value changes and it is displayed correctly but when i wanna save the new value, it is not passed to Json i always see it as null. I dont know how to bind its value with the model.
How could i fix it ?
Thanks,
Saving of custom fields is up to developer. You can put corresponding logic to some of the following events as an option:
Gnt.widget.taskeditor.TaskEditor.afterupdatetask
Gnt.widget.taskeditor.TaskEditor.beforeupdatetask
Gnt.widget.taskeditor.TaskEditor.afterupdatetask
Gnt.widget.taskeditor.TaskEditor.beforeupdatetask