Results 1 to 2 of 2

Thread: FileField Disable button not working

  1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    35
    Answers
    6

    Default FileField Disable button not working

    Hi All,

    I am trying to disable the disable the button on filefield at runtime from viewcontroller but I am getting the error.

    Error in Component.js

    me.ariaEl.dom.setAttribute('aria-disabled', false); // Cannot read property 'setAttribute' of null [ Seems me.ariaEl.domis coming as null]

    Error stack trace .........

    Uncaught TypeError: Cannot read property 'setAttribute' of null
    at constructor.onEnable (Component.js?version=20170809094755:4378)
    at constructor.callParent (Base.js?version=20170809094755:1288)
    at constructor.onEnable (Button.js?version=20170809094755:1786)
    at constructor.callParent (Base.js?version=20170809094755:1288)
    at constructor.onEnable (FileButton.js?version=20170809094755:165)
    at constructor.enable (Component.js?version=20170809094755:3033)
    at constructor.setDisabled (Component.js?version=20170809094755:4863)

    I have a simple file field,

    Code:
      {
                    xtype: 'filefield',
                    fieldLabel: 'Attach Items',
                    buttonText: 'Browse Items',
                    itemId : 'buttonid',
                    buttonConfig: {
                        id : 'uploadmailwidget0Btn'
                    },
            }
    Trying to disable in viewcontroller as -
    Code:
     Ext.getCmp('uploadmailwidget0Btn').setDisabled(true);
    Can someone please help? Ask is simple, I want to disable the button on filefield from viewcontroller.

  2. #2
    Sencha Premium User
    Join Date
    Feb 2010
    Location
    Chicago
    Posts
    72
    Answers
    17

    Default

    Fiddle example:


Similar Threads

  1. Button is not displaying in fileField
    By innovista1 in forum Ext: Q&A
    Replies: 1
    Last Post: 4 Dec 2013, 7:02 AM
  2. [INFOREQ] [4.1.2a] filefield button text
    By Hanterdro in forum Ext:Bugs
    Replies: 2
    Last Post: 15 Oct 2012, 2:53 AM
  3. [CLOSED] disable button tooltip not working with firefox
    By jeewiya in forum Ext:Bugs
    Replies: 1
    Last Post: 10 Jan 2012, 9:24 AM
  4. drop down disable button not working
    By snss in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 3 May 2008, 11:27 PM

Tags for this Thread

Posting Permissions

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