Results 1 to 2 of 2

Thread: Listener on reused component doesn't work every time

  1. #1
    Sencha User
    Join Date
    Jun 2007
    Posts
    266
    Answers
    7

    Default Listener on reused component doesn't work every time

    This is how my view is setup

    I have a tab panel with 5 tabs
    Each tab has a form on it
    Within each form, I am reusing a custom combo box.

    So I have a listener in my controller setup to listen for when that combo box is changed.

    Code:
    //Tried it both ways below
    'rhux-combo-category': {
                    change: me.categoryComboChanged
                },
    'rh-schedulertabpanel rhux-combo-category': {
                    change: me.categoryComboChanged
                },
    When I select that combo box, on the first tab, it works just fine. However, when I choose any of the other tabs, and select the combo box again to change values, the event method is never called. What am I doing wrong?

  2. #2
    Sencha User
    Join Date
    Jun 2007
    Posts
    266
    Answers
    7

    Default

    Hah, doesn't fail. As soon as I post, I find the answer. I had to add a 'form' attribute to my control object. Not sure why though. I thought if I just put a space between the tab panel and combo box, it would traverse all the way down the chain to find the combo box.

    Code:
    'rh-schedulertabpanel form rhux-combo-category'

Posting Permissions

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