Results 1 to 3 of 3

Thread: How can a child item bind a config to a parent view?

  1. #1
    Sencha Premium User
    Join Date
    Jan 2014
    Location
    Fort Worth, TX, USA
    Posts
    62
    Answers
    2

    Question How can a child item bind a config to a parent view?

    I am trying to update a container extension to utilize binding and be able to update a child component's cls. This is my current code:

    Code:
        /**
         * Setter for sprite class used to change the sprite in each subpanel.
         *
         * @param {string} newClass The new icon class.
         * @param {string} oldClass The old icon class.
         */
        updateSpriteCls: function (newClass, oldClass) {
            var me = this,
                spriteComponent = me.down("#panelSprite");
    
    
            spriteComponent.removeCls(oldClass).addCls(newClass);
            me.fireEvent("spritechange", me, oldClass, newClass);
        }
    Rather than dealing with the sprite component on its own, I'd like to bind its cls to the parent view's spriteCls config. Is there a straightforward way to do that?

  2. #2
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    962
    Answers
    55

    Default

    Hi davmillar,

    Hopefully you've been able to get this working, if not could you put your example into a fiddle (http://fiddle.sencha.com) so we can take a look further?

    Regards,
    Bryan

  3. #3
    Sencha Premium User
    Join Date
    Jan 2014
    Location
    Fort Worth, TX, USA
    Posts
    62
    Answers
    2

    Default

    We refactored away the problem.Dave

Similar Threads

  1. Replies: 1
    Last Post: 26 Nov 2014, 4:04 PM
  2. Bind Variable in SA to Parent (or to Child)
    By blomasky in forum Sencha Architect 3.x: Q&A
    Replies: 2
    Last Post: 13 Aug 2014, 3:08 AM
  3. accessing a parent config from a child item
    By gkatz in forum Sencha Touch 2.x: Discussion
    Replies: 3
    Last Post: 8 Jan 2014, 10:40 AM
  4. pass a config from parent to child panel?
    By flyboarder in forum Ext: Discussion
    Replies: 7
    Last Post: 20 May 2011, 10:22 PM
  5. Replies: 0
    Last Post: 17 Jan 2010, 7:34 AM

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
  •