1. #1
    Ext JS Premium Member
    Join Date
    Apr 2011
    Location
    London, UK
    Posts
    32
    Vote Rating
    1
    markofsine is on a distinguished road

      0  

    Default Namespace support (and custom components)

    Namespace support (and custom components)


    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 component
    Points 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
                    },
    ...

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,185
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      0  

    Default


    We acknowledge that there are users that want to use multiple namespaces in a single project.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2011
    Location
    London, UK
    Posts
    32
    Vote Rating
    1
    markofsine is on a distinguished road

      0  

    Default




    Ok... is this going to be added in the current release?

    Adding this functionality would be a really huge step in the right direction of making the designer a fully capable development environment.

    Perhaps a phase 1 release does not need to fully support all the bells and whistles customization of for example a grid component. But at least being able to subclass for example the Ext.form.field.Display and set high level properties. Then setting Namespace and requires and export flag....
    Simple, but brings a lot of flexibility to the designer environment.

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,185
    Vote Rating
    63
    aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice aconran is just really nice

      0  

    Default


    We will be reviewing this in detail post GA.
    Aaron Conran
    @aconran
    Sencha Architect Development Team