Results 1 to 2 of 2

Thread: Controller control: and dom element listeners

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    82
    Answers
    4
    Vote Rating
    3
      0  

    Default Controller control: and dom element listeners

    Hi Everyone,

    I am working on an ST 2.1 based app at the moment and will be using the ChildBrowser to display external content. That's the easy part.

    I have html content in my app and in that I have littered tags like

    Code:
    <a href="http://www.somewhere.com" title="Go somewhere in ChildBrowser" rel="external">Some site</a>
    I would like to be able to modify my control: {} block and add an itemtap for these <a/> tags to my controller, without having to add event listeners and delegates to all of my views.

    Can this be done? And if so, how? Caouldn't find much on Google about it.

    Thanks in advance,

    Matt

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    The controller does not have any mechanism to listen for element events, only component events. You view needs to listen for the elements it has and then fire an event on itself so then the controller can listen to it.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

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
  •