I am new to CQ5 and ExtJS. I have created a cq extjs widget. Now there are a lot of hardcoded strings in my widget js file. Like fieldLabel, fieldDescription, addItemLabel, rootPath etc etc... I wish to pass this widget on to another team but don't want them to make any changes in my widget js script, as they might make mistakes as they completely non technical people.
I wish I could create another separate js file and declare some global variables and set values of the above mentioned many many fields, by reading the values from the global variables.
I would name this separate js file mywidgetconfig.js and will request the other team to make changes as per their needs only and only in this file.
For example, in my widget I have hardcoded -->
{
fieldLabel : 'Multi Field to setup links'
}
I wish I could keep this value in the mywidgetconfig.js as :
INNERMULTIFIELD_FIELD_LABEL_TEXT_STRING : 'Multi Field to setup links',
and so on like
INNERMULTIFIELD_FIELD_DESC_TEXT_STRING : 'blah blah blah'
and in my actual widget js I could access the values as -->
{
fieldLabel : MyNamespace.INNERMULTIFIELD_FIELD_LABEL_TEXT_STRING,
fieldDescription: MyNamespace.INNERMULTIFIELD_FIELD_DESC_TEXT_STRING
}
Is this possible?