1. #1
    Sencha User vaucer's Avatar
    Join Date
    Aug 2009
    Location
    Paris
    Posts
    50
    Vote Rating
    0
    vaucer is on a distinguished road

      0  

    Default [SOLVED] Select index combo box getForm().load

    [SOLVED] Select index combo box getForm().load


    Hello,

    I load data into a form with getForm().load method.

    My textfield are correctly populate with good value form the load of the form, but i don't know the good way to do this with my combo box...

    If anyone can help me about this cosmetic problem you save my life, i tried many solution founded on forums but it didn't help.

    My specific combobox datastore:
    Code:
    var storeCritik = new Ext.data.SimpleStore({
                fields: ['id','Critik'],
                data : [['1','*'],['2','**'],['1','***']]
            });
    My form with my combobox:
    Code:
    var simple = new Ext.FormPanel({
            id:'simple',
            reader: new Ext.data.XmlReader({
             record: 'response',
             totalProperty: 'total',
             id: 'idr'
             },[
             {name: 'ID',mapping: 'idr'},
             {name: 'differ',mapping: 'differ'},
             {name: 'critik',mapping: 'critik'}
             ]),
            labelWidth: 75, // label settings here cascade unless overridden
            frame:true,
            title: 'Simple Form',
            bodyStyle:'padding:5px 5px 0',
            width: 350,
            defaults: {width: 230},
            defaultType: 'textfield',
    
            items: [{
                    fieldLabel: 'First Name',
                    id:'Identifiant',
                    name: 'ID',
                    allowBlank:false
                },{
                    fieldLabel: 'Last Name',
                    name: 'differ'
                },{
                    xtype: 'combo',
                    name: 'critik',
                    fieldLabel: 'Criticité',
                    store: storeCritik,
                    displayField:'Critik',
                    valueField:'id',
                    typeAhead: true,
                    mode: 'local',
                    forceSelection: true,
                    triggerAction: 'all',
                    allowBlank: false,
                    disabled: true,
                    emptyText:''
                 }],
    
            buttons: [{
                text: 'Save'
            },{
                text: 'Cancel'
            }]
        });
    And finally i load my store manually in function like this:
    Code:
    simple.getForm().load({
                            url: 'php/sibes/map_sib.php',
                            method: 'POST',
                            params: {task:"LISTINGFORM",id:Ext.getCmp('Identifiant').getValue()}
                    });
    I want just select the value contain in the reader of my form "critik" in my combobox.

    Thank you very if you have time to help me.

    Sorry for my english

    Vaucer

  2. #2
    Sencha User vaucer's Avatar
    Join Date
    Aug 2009
    Location
    Paris
    Posts
    50
    Vote Rating
    0
    vaucer is on a distinguished road

      0  

    Default


    Ok finally is ok. I don't know where have been the problem but all work now. My combobox are well selected.

    Still sorry for incoveniences

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar