2014-06-13 11:06:00
Topic starter
ModelFormContainer's are designed to use defaultConfig, actionConfig, viewConfig, perActionConfig. However, if you implement a more specific config (actionConfig on top of defaultConfig), the code uses the most specific config and ignores other configs that apply. How can I get these configs to behave like cascading style sheets or have object-oriented behavior, where they extend each other instead of override each other?
This pattern will allow configs to extend each other instead of overriding each other.
DDA.ApproveOrDenyRR = Ext.extend(One.model.ModelFormContainer, {
defaultConfig: {
prepareFields: function(fields){
// common prepareFields functionality
this.prepareFieldsOther(fields);
}
}
,detailConfig: {
prepareFieldsOther: function(fields){
// specific detail prepareFields functionality
}
}
,actionConfig: {
,prepareFieldsOther: function(fields){
// specific action prepareFields functionality
}
}
});