Hi,
I try to develop my first Extra for Modx revolution. I’m following this tutorial :
http://rtfm.modx.com/display/revolution20/Developing+an+Extra+in+MODX+Revolution%2C+Part+II#DevelopinganExtrainMODXRevolution%2CPartII-AddinganUpdateWindow
I have some difficulties with the update window. Some field are empty when I edit my items. I noticed that’s the fields that are not displayed in the grid. How can I reload all the data when the edit window is opened ?
My edit window :
Activities.window.UpdateActivity = function(config) {
config = config || {};
Ext.applyIf(config, {
title : _('activities.activity_update'),
url : Activities.config.connectorUrl,
baseParams : {
action : 'mgr/activity/update'
},
fields : [ {
xtype : 'hidden',
name : 'id'
}, {
xtype : 'textfield',
fieldLabel : _('activities.title'),
name : 'title',
width : 300
}, {
xtype : 'textfield',
fieldLabel : _('activities.venue'),
name : 'venue',
width : 300
}, {
xtype : 'xdatetime',
fieldLabel : _('activities.datebegin'),
name : 'datebegin',
allowBlank : true,
dateFormat : MODx.config.manager_date_format,
timeFormat : MODx.config.manager_time_format,
dateWidth : 120,
timeWidth : 120
}, {
xtype : 'xdatetime',
fieldLabel : _('activities.dateend'),
name : 'dateend',
allowBlank : true,
dateFormat : MODx.config.manager_date_format,
timeFormat : MODx.config.manager_time_format,
dateWidth : 120,
timeWidth : 120
}, {
xtype : 'textarea',
fieldLabel : _('activities.description'),
name : 'description',
width : 300
} ]
});
Activities.window.UpdateActivity.superclass.constructor.call(this, config);
};
Ext.extend(Activities.window.UpdateActivity, MODx.Window);
Ext.reg('activities-window-activity-update', Activities.window.UpdateActivity);
Julien