1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    4
    Vote Rating
    0
    lee7ster is on a distinguished road

      0  

    Default Event Delegation on XTemplate for ComboBox

    Event Delegation on XTemplate for ComboBox


    I am currently using a component that extends a ComboBox. I have read about the delegate feature that was introduced in 3.4.0 that can be used to distinguish between different classes, but I am stuck on 3.3.3 for reasons that are out of my control. Is there any way to do something similar on ExtJs 3.3.3 or older?

    I basically have a pretty basic template and I want to distinguish between multiple items on a single row.

    Below is a post with someone who has had the same problem, but the solution only works for 3.4.0
    Help would be greatly appreciated. Thanks!!



    http://www.sencha.com/forum/showthre...403#post988403

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,033
    Vote Rating
    213
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    You may also be able to get what you're looking for using the eventObject's getTarget method.
    http://docs.sencha.com/extjs/3.4.0/#...thod-getTarget

    The first param you'd pass is the selector that you're wanting to test for - so very similar to the use of delegate in this respect. You'd just test for the click to have happened on the desired target (or multiple tests if various actions should take place) and proceed according to the click location.

Thread Participants: 1

Tags for this Thread