Results 1 to 3 of 3

Thread: Dynamically change config to all future instances of a component defined by me

  1. #1
    Sencha User
    Join Date
    May 2015
    Posts
    44
    Vote Rating
    0
      0  

    Default Dynamically change config to all future instances of a component defined by me

    hi.
    i've this component


    Code:
    Ext.define('CS.view.ImportGridRecordsButton' ,{
        extend: 'Ext.button.Button',
        alias: 'widget.importbtn',
       
                      
        constructor: function()
         {
                   this.text = "Importa"
                   this.icon = './images/extras/import-icon.gif'
                   this.tooltip = "Importa record da un file XLSX, XLS o CSV"
                   this.alias = "btnImportRecords"
                   
                   this.callParent(arguments)
                   
         }
    })

    I include this item in many views with this syntax
    HTML Code:
    items: [{xtype:"importbtn"}]

    Those views that include my button are instantiated dynamically, and i need to make disabled the button, both in actual instances and those that i will instantiate in future.


    I need to make the config "disabled:true" inside the object itself.


    I tryied with no success:
    Ext.apply("CS.view.ImportGridRecordsButton", {disabled:true})


    still remains enabled

  2. #2
    Sencha User
    Join Date
    May 2015
    Posts
    44
    Vote Rating
    0
      0  

    Default

    bump

  3. #3
    Sencha Premium User twaindev's Avatar
    Join Date
    Sep 2009
    Posts
    241
    Answers
    16
    Vote Rating
    9
      0  

    Default

    Try:

    this.callParent(arguments);
    this.setDisabled(true);

Similar Threads

  1. Change the combobox 'name' config dynamically
    By josei in forum Ext 5: Q&A
    Replies: 2
    Last Post: 9 Apr 2015, 1:28 AM
  2. How to change a component's config dynamically?
    By hexawing in forum Ext: Q&A
    Replies: 6
    Last Post: 27 Jun 2012, 12:10 PM
  3. Change allowBlank config dynamically
    By Farish in forum Ext: Discussion
    Replies: 8
    Last Post: 6 Mar 2012, 8:42 AM
  4. Change config for tab control dynamically
    By tBSTAR in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 13 Jan 2009, 10:51 AM

Posting Permissions

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