0 Replies Latest reply on May 7, 2008 3:37 PM by x77686d

    Unexpected event target when clicking on a Panel

    x77686d
      Below is a program that I wrote to improve my understanding of the event flow. It simply creates a Button within a Panel within an Application and registers listeners for each component for both capturing and bubbling phases. I understand the output when I click outside of the panel or on the button but when I click the panel, I get this output:

      listener for application, capture phase, target = Evphases0.panel1.UIComponent8.UITextField10, currentTarget = Evphases0
      listener for panel1, capture phase, target = Evphases0.panel1.UIComponent8.UITextField10, currentTarget = Evphases0.panel1
      listener for panel1, bubbling phase, target = Evphases0.panel1.UIComponent8.UITextField10, currentTarget = Evphases0.panel1
      listener for application, bubbling phase, target = Evphases0.panel1.UIComponent8.UITextField10, currentTarget = Evphases0
      -------------------------

      I expected the target to be Evphases0.panel1, not Evphases0.panel1.UIComponent8.UITextField10.

      What's the reason for this unexpected target?