2013-07-22 2 views
0

나는 선택할 수있는 콤보 상자에 상점 데이터를 저장하려고합니다.'상점'데이터를 콤보 상자에 넣기

Ext.define('AM.store.Users', { 
    extend: 'Ext.data.Store', 
    model: 'AM.model.User', 
    fields: ['name', 'email'], 
    data: [ 
     {name: 'Ed Hayes', email: '[email protected]'}, 
     {name: 'Tommy Gunz', email: '[email protected]'}, 
     {name: 'Johnny Bravo', email: '[email protected]'}, 
     {name: 'Billy Joe', email: 'billyJgeemail.com'}, 
     {name: 'James Bond', email: '[email protected]'} 
    ] 
}); 

여기 내 app.js :

items: [ 
    { xtype: 'panel', 
     padding: 5, 
     height: 500, 
     width: '35%', 
     items: [ 
      { 
      xtype: 'combobox', 
      padding: 5, 
      fieldLabel: 'Criteria', 
      stores: 'AM.store.hello' 
      } 
     ] 
    }, ... 

현재이 작동하지 않는, 어떤 아이디어

여기 내 store.Users입니까?

답변

0
당신은 제대로 특히, 상점과 displayField 콤보 상자의 속성을 지정해야합니다

:

{ 
    xtype: 'combobox', 
    fieldLabel: 'Criteria', 
    displayField: 'name',// or email 
    name:.., 
    valueField:.. 
}