2014-12-16 3 views
0

저는 extjs에서 combobox에 값을 설정하려고합니다. 이것은 크롬에서는 작동하지만 파이어 폭스에서는 작동하지 않습니다. 내가 사용하는 것이 일반적인 guidence AS코드는 크롬에서 작동하지만 파이어 폭스에서는 extjs가 아닙니다

function callFromController(comboitemid,itemvalue) { 
     Ext.ComponentQuery.query(comboitemid)[0].setValue(itemvalue); 
}; 
+1

어떤 extjs라는 버전을 다음 코드를 사용? 버그를 재생산하는 jsfiddle을 제공해주십시오. – Chetan

+0

extjs를 사용 중입니다. 4.1 – ShankarRade

+0

오류가 무엇입니까? 파이어 폭스에서 디버그 했습니까? – Sreek521

답변

0

:

function callFromController(comboitemid,itemvalue) { 
    // make sure you add a # to your Id string or use Ext.getCmp insted. 
    var foundComponents = comboitemid && Ext.ComponentQuery.query(comboitemid); 
    if (foundComponents.length) { 
     // I would add to see in your console.log('foundComponents[0]=%o',foundComponents[0]) 
     // to check the value of the found component 
     foundComponents[0].setValue(itemvalue); 
    } 
}; 
+0

안녕하세요 Gabriel Kohen, #이 (가)있는 콤보 항목 ID에 대해 확실하지만 코드 위에 시도했지만 파이어 폭스에서는 작동하지 않습니다. 이 코드는 Chrome에서도 작동합니다. – ShankarRade

+0

안녕하세요. JSFiddle/Sencha Fiddle에서 예제를 설정 하시겠습니까? –

+0

나는 이렇게하려고합니다. http://jsfiddle.net/Loyv03Lt/14/ – ShankarRade

관련 문제