Proper technique to add listeners to DOM created via an XTemplate?

前端 未结 4 1107
刺人心
刺人心 2020-12-24 15:31

We use XTemplates - lots of XTemplates. They are great for displaying read-only content. But have you ever added (Ext JS) listeners to DOM created via a template? Would y

4条回答
  •  不思量自难忘°
    2020-12-24 15:59

    Well, you can use something like this:

    1. create id via Ext.id(), pass it to the template to some element
    2. then fetch that element using Ext.get()
    3. attach the listener to just found element

提交回复
热议问题