Related to an earlier post...
We have a number of custom components that live in a completely separate namespace
(e.g. MyUx.form.field.CoolDateField)
We need the ability to reference these.
I see the workflow as follows:
UX Project (Namespace = MyUx)
1. Add a basic date field.
2. Promote to class.
3. Set classname and alias based on current application namespace.
4. Add custom properties (and code)
5. Export / save to toolbox
e.g Saved component :
Classname: MyUx.view.form.field.CoolDateField
Alias: MyUxCoolDateField
Other project (Namespace = MyApp)
1. Create a new project in a separate namespace.
2. Import or use saved toolbox componentPoints to note:
-- Ability to flag as not exported or and not add 'Requires' property.
-- If you still want the requires property is should be as per the original namespace (MyUx...)
-- Should reference ux alias xtype. (MyUxCoolDateField)
eg: Generated code:
Code:
....
requires: [
'MyUx.view.form.field.CoolDateField' // If flagged for export/save
],
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [
{
xtype: 'textfield',
width: 300,
name: 'name',
fieldLabel: 'Name'
},
{
xtype: 'MyUxCoolDateField',
name: 'datecreated'
format : 'd/m/Y H:i:s
},
...