2013-04-10 19 views
0

我正在extjs4中工作。我有tpl查看顯示問題和多個選項 -如何將tab訪問[tabindex]功能添加到tpl的extjs4

Ext.define('Balaee.view.qb.qbqns.QbqnsReview', { 
    extend: 'Ext.view.View', 
    id: 'qbqnsViewId', 
    alias: 'widget.QbqnsReviewView', 
    height: 500, 
    store: 'qb.QbqnsStore', 
    autoScroll: true, 
    config: { 
     tpl: '<tpl for=".">' + 
      '<div id="main">' + 
      '</br>' + 

      '<h1 id="q">Question :-</h1> {question}</br>' + 

      '<tpl for="options">' + 
      '<tpl if="parent.Correctoption==optionId">' + 
      '<p style="color:Green"><input type="radio" name="{option}">{option}</p>' + 
      '<tpl elseif="parent.UsersOption==optionId">' + 
      '<p style="color:Red"><input type="radio" name="{option}">{option}</p>' + 
      '<tpl else>' + 
      '<p><input type="radio" name="{optionId}" value="{option}">&nbsp{option}</p>' + 
      '</tpl>' + 
      '</tpl>' + 
      '<p>---------------------------------------------------------</p>' + 
      '</div>' + 

      '</tpl>', 
     itemSelector: 'div.main' 
    } 
}); 

它的工作正常。其正確顯示20個問題及其相關選項。我想添加tabindex屬性。即如果用戶解決問題並按下標籤按鈕,則焦點應該轉到下一個問題。因此,如何選項卡訪問功能在extjs4添加到TPL

回答