Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Advanced user extension configs

  1. #11
    Sencha Premium User
    Join Date
    Dec 2009
    Location
    Iasi, Romania
    Posts
    159

    Default

    Steve, I tried something like this and it doesn't work:
    Code:
        listeners: [{
            name:   "onSetup",
            fn:     "onSetup"
        },{
            name:   "setup",
            fn:     "onSetup"
        }],
    
    
        //define handlers
        onSetup: function() {
            this.setCfgValue('enableLocking',false);
        }
    Any clue? Thanks.

  2. #12

    Default

    I see what you're saying now... this one's pretty specific, and tricky! I'm not sure off the top of my head how to support that right now. Internally we have an event that would help with this, but it's not exposed to AUXs yet due to some complexities with how we've had to implement it (for security, primarily). I think for now you may just need to document this for any users of the AUX, but I'll ask around internally and see if I can come up with any other approach to achieving what you want (in the current version of Architect, so you don't have to wait for a future version that may make such things easier).
    Steve Sobel
    @honestbleeps
    Sencha Architect Development Team

  3. #13
    Sencha Premium User
    Join Date
    Dec 2009
    Location
    Iasi, Romania
    Posts
    159

    Default

    Quote Originally Posted by honestbleeps View Post
    I see what you're saying now... this one's pretty specific, and tricky! I'm not sure off the top of my head how to support that right now. Internally we have an event that would help with this, but it's not exposed to AUXs yet due to some complexities with how we've had to implement it (for security, primarily). I think for now you may just need to document this for any users of the AUX, but I'll ask around internally and see if I can come up with any other approach to achieving what you want (in the current version of Architect, so you don't have to wait for a future version that may make such things easier).
    Any chance to generate the code inside initComponent? This would be enough for now. How can I do that?
    Thanks

  4. #14

    Default

    all of the code generation comes from what's in the configs, so unfortunately I don't think there's a way (right now) for you to change that, sorry. You could certainly handle the values in the actual JS for your module, though, and log out a warning to users who have incompatible settings, etc. Sorry that's not the best possible solution, but until we open up a bit more functionality I'm afraid I can't think of a better way.
    Steve Sobel
    @honestbleeps
    Sencha Architect Development Team

  5. #15
    Sencha Premium User
    Join Date
    Dec 2009
    Location
    Iasi, Romania
    Posts
    159

    Default

    Hi Steve,
    I'm coming back with some more questions regarding uax for Architect. It seems that "validChildTypes" and "validParentTypes" are not working as expected .Inside Architect dragging and dropping a plugin onto a pivot grid doesn't work. Is there something that I'm missing in my configs?

    This is the definition for the PivotGrid component:
    Code:
    {
        "classAlias":       "widget.mzpivotgrid",
        "className":        "Mz.pivot.Grid",
        "inherits":         "Ext.grid.Panel",
        "validChildTypes":  ["mzconfigurator", "mzdrilldown", "mzexcelexport", "mzrangeeditor"],
        "autoName":         "MyPivotGrid",
        "helpText":         "A pivot grid container",
    
    
        "toolbox": {
            "name":     "Pivot Grid",
            "category": "Grid",
            "groups":   ["Grids"]
        },
    
    
        "configs": [{
            "name":         "matrixConfig",
            "type":         "object",
            "initialValue": "null",
            "helpText":     "Define here matrix specific configuration."
        },{
            "name":         "enableLoadMask",
            "type":         "boolean",
            "initialValue": true
        },{
            "name":         "enableLocking",
            "type":         "boolean",
            "initialValue": false
        },{
            "name":         "columnLines",
            "type":         "boolean",
            "initialValue": true,
            "helpText":     "Set this on false if you don't want to show the column lines."
        },{
            "name":         "viewLayoutType",
            "type":         "string",
            "editor":       "options",
            "options":      ["outline", "compact"],
            "initialValue": "outline",
            "helpText":     "Type of layout used to display the pivot data."
        },{
            "name":         "rowSubTotalsPosition",
            "type":         "string",
            "editor":       "options",
            "options":      ["first", "none", "last"],
            "initialValue": "first",
            "helpText":     "Position of the sub totals of row groups."
        },{
            "name":         "rowGrandTotalsPosition",
            "type":         "string",
            "editor":       "options",
            "options":      ["first", "none", "last"],
            "initialValue": "last",
            "helpText":     "Position of the grand total of rows."
        },{
            "name":         "colSubTotalsPosition",
            "type":         "string",
            "editor":       "options",
            "options":      ["first", "none", "last"],
            "initialValue": "last",
            "helpText":     "Position of the sub totals of col groups."
        },{
            "name":         "colGrandTotalsPosition",
            "type":         "string",
            "editor":       "options",
            "options":      ["first", "none", "last"],
            "initialValue": "last",
            "helpText":     "Position of the grand total of cols."
        },{
            "name":         "textTotalTpl",
            "type":         "string",
            "initialValue": "Total ({name})",
            "helpText":     "Configure the template for the group total. (i.e. '{name} ({rows.length} items)')"
        },{
            "name":         "textGrandTotalTpl",
            "type":         "string",
            "initialValue": "Grand total",
            "helpText":     "Configure the template for the grand total."
        },{
            "name":         "leftAxis",
            "type":         "array",
            "initialValue": [],
            "helpText":     "Define the left axis used by the grid."
        },{
            "name":         "topAxis",
            "type":         "array",
            "initialValue": [],
            "helpText":     "Define the top axis used by the grid."
        },{
            "name":         "aggregate",
            "type":         "array",
            "initialValue": [],
            "helpText":     "Define the fields you want to aggregate in the pivot grid. You can have one or multiple fields."
        },{
            "name":         "clsGroupTotal",
            "type":         "string",
            "initialValue": "x-grid-group-total",
            "helpText":     "CSS class assigned to the group totals."
        },{
            "name":         "clsGrandTotal",
            "type":         "string",
            "initialValue": "x-grid-grand-total",
            "helpText":     "CSS class assigned to the grand totals."
        },{
            "name":         "startRowGroupsCollapsed",
            "type":         "boolean",
            "initialValue": true,
            "helpText":     "Should the row groups be expanded on first init?"
        },{
            "name":         "startColGroupsCollapsed",
            "type":         "boolean",
            "initialValue": true,
            "helpText":     "Should the col groups be expanded on first init?"
        },{
            "name":         "showZeroAsBlank",
            "type":         "boolean",
            "initialValue": false,
            "helpText":     "Should 0 values be displayed as blank?"
        },{
            "name":         "store",
            "type":         "store",
            "initialValue": null
        },{
            "name":         "plugins",
            "type":         "array",
            "initialValue": [],
            "helpText":     "Collection of plugins."
        }]
    }
    And this is the definition for one of the plugins:
    Code:
    {
        "classAlias":       "plugin.mzconfigurator",
        "className":        "Mz.pivot.plugin.Configurator",
        "inherits":         "Ext.AbstractPlugin",
        "autoName":         "MyConfigurator",
        "validParentTypes": ["mzpivotgrid"],
        "helpText":         "A plugin which allows to easily configure the pivot grid",
    
    
        "toolbox": {
            "name":     "Configurator",
            "category": "Pivot Grid plugins",
            "groups":   ["Grids"]
        },
    
    
        "configs": [{
            "name":         "fields",
            "type":         "array",
            "initialValue": []
        }]
    }
    Thanks

  6. #16

    Default

    would you mind sending the latest AUX package so I can take a closer look? I could be misremembering here but it may be that you need a fully qualified classname for the validparenttypes/validchildtypes - i can't recall which of our several different 'types' gets populated here!
    Steve Sobel
    @honestbleeps
    Sencha Architect Development Team

  7. #17
    Sencha Premium User
    Join Date
    Dec 2009
    Location
    Iasi, Romania
    Posts
    159

    Default

    You were right. I just tested with fully qualified classname and it works.
    Thanks!

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •