Hi,
I have created Extensible Framework code for my UDS, to change field state to protected based on wspf_10_status value:
================================================================================================
Ext.define('EAM.custom.external_su0008', {
extend: 'EAM.custom.AbstractExtensibleFramework',
getSelectors: function () {
return {
'[extensibleFramework] [tabName=HDR][isTabView=true] [name=wspf_10_status]': {
blur: function (field, lastValues) {
vStatus = field.getValue(),
vFormPanel = field.formPanel;
if (vStatus == 'PAID') {
EAM.Builder.setFieldState({ 'wspf_10_description': 'protected' }, vFormPanel.getForm().getFieldsAndButtons());
EAM.Builder.setFieldState({ 'wspf_10_createddate': 'protected' }, vFormPanel.getForm().getFieldsAndButtons());
EAM.Builder.setFieldState({ 'wspf_10_supplier': 'protected' }, vFormPanel.getForm().getFieldsAndButtons());
EAM.Builder.setFieldState({ 'wspf_10_reference': 'required' }, vFormPanel.getForm().getFieldsAndButtons());
EAM.Builder.setFieldState({ 'wspf_10_paiddate': 'required' }, vFormPanel.getForm().getFieldsAndButtons());
}; /* blur */
} /* [tabName=HDR] */
},
}
}
}
);
=====================================================================================================
The fields turned to protected state after I changed the status to PAID, then clicked out. But after I refresh the page, the fields are not protected anymore.
I know there is afterloaddata method to replace the blur method that I use in this code. But, i don't know how to use that method. Does anyone here can help?
Thanks