Results 1 to 5 of 5

Thread: Setting a default msgTarget for the application

  1. #1
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    136
    Answers
    8
    Vote Rating
    6
      0  

    Default Answered: Setting a default msgTarget for the application

    I'm trying to set a default msgTarget for all the fields in my application and haven't had any success. I thought that something like this before my application.js would do it:
    Code:
    Ext.override(Ext.form.Labelable, {
        msgTarget: 'under'
    });
    But that doesn't work. Any ideas?

  2. Figured it out. If you override the class that inherits the Labelable mixin, it works fine.
    Code:
    Ext.define('MyOverride', {
      override: 'Ext.form.field.Base',
      msgTarget: 'under'
    });

  3. #2
    Sencha Premium User krullj's Avatar
    Join Date
    Sep 2011
    Posts
    123
    Answers
    5
    Vote Rating
    15
      0  

    Default

    Honestly, it looks like it should work, but you may want to try the newer format (and make absolutely sure that your override is being applied).

    Just to be safe, try this format, adjusting the class name as necessary:
    Code:
    Ext.define('MyApp.override.Labelable', {
      override: 'Ext.form.Labelable',
      msgTarget: 'under'
    });

  4. #3
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    136
    Answers
    8
    Vote Rating
    6
      0  

    Default

    That doesn't work either. Weird. Still trying to figure this one out.

  5. #4
    Sencha Premium User krullj's Avatar
    Join Date
    Sep 2011
    Posts
    123
    Answers
    5
    Vote Rating
    15
      0  

    Default

    Figured it out. If you override the class that inherits the Labelable mixin, it works fine.
    Code:
    Ext.define('MyOverride', {
      override: 'Ext.form.field.Base',
      msgTarget: 'under'
    });

  6. #5
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    136
    Answers
    8
    Vote Rating
    6
      0  

    Default

    That did it, thanks!

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
  •