Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

175
Visualizações
Extjs: How to set extraparam from controller to use in the store for populating combobox value.want to set extraparam value as abc.1-cond1, abc.2-con2

In ExtJS I want to set extraParam in a controller. These extraParams should be used in a store.

I want to show data in my combobox based on a condition.

If condition 1 is satisfied the extraparam contains abc.1

Then the store loads data corresponding to a groupID to get data

..same for condition 2(abc.2).

how can i set extraparam?

//Store

abcStore: {
    type: 'store',
    proxy: {
        type: 'ajax',
        url: PPA_SERVICE_BASE_URL + 'any.Service',
        paramsAsJson: true,
        actionMethods: {
            read: 'POST'
        },
        reader: {
            type: 'json',
            rootProperty: 'data'
        },                       
    }
}
   

//Combobox

xtype: 'combobox',
fieldLabel: 'Payment Stream Type',
labelWidth: 130,
width: 280,
editable: false,
margin: '0 10 0 0',
displayField: 'label',
allowBlank: false,
bind: {
    store: '{abcStore}',
}

//Controller - function to load data

loadabcData: function(newValue) {
    var me = this,
        view = me.getView(),
        viewModel = this.getViewModel(),
        store = viewModel.getStore('abcStore'),
        extraParam = {groupId: groupId};

    store.getProxy().setExtraParams(extraParams);
    store.load();
      
    // How should i further set this groupID.I want to set groupId value as abc.1 on condition1 and //abc.2 on condition 2
},
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You almost had it

loadabcData: function(condition) {
    var me = this,
        view = me.getView(),
        viewModel = this.getViewModel(),
        store = viewModel.getStore('abcStore'),
// ==> next line does the trick
        groupId = (condition === 'Cond1') ? 'abc.1' : 'abc.2',
        extraParam = {groupId: groupId};

    store.getProxy().setExtraParams(extraParams);
    store.load();
      
    // How should i further set this groupID.I want to set groupId value as abc.1 on condition1 and //abc.2 on condition 2
},
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda