1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    1
    Vote Rating
    0
    rchen5990@gmail.com is on a distinguished road

      0  

    Default Unanswered: RadioGroup get GroupValue

    Unanswered: RadioGroup get GroupValue


    Hi All,

    I am migrating my Ext JS 3 app to 4 and I am running into a little trouble with radiogroup.

    var testSearchCriteria = Ext.create('Ext.form.Panel',{
    items: [{
    xtype: 'radiogroup',
    fieldLabel: 'Test Search Criteria',
    columns : 1,
    id: 'testSearchCriteria',
    name: 'testSearchCriteria',
    margins : '10 10 10 10',
    items: [
    {boxLabel: 'Test Suite Tango Id', name: 'id-1', inputValue : 'testSuiteTangoId', checked: true},
    {boxLabel: 'Test Case Tango Id', name: 'id-1', inputValue : 'testCaseTangoId'},
    {boxLabel: 'Test Area', name: 'id-1', inputValue : 'testArea'}
    ],
    listeners:{
    change : function(radiogroup,radio){
    if(radio.getGroupValue == 'testSuiteTangoId'){
    testTangoIdSearchKeyTextField.hide();
    testAreaCombo.hide();
    suiteTangoIdTextField.show();
    } else if(radio.getGroupValue == 'testCaseTangoId') {
    testTangoIdSearchKeyTextField.show();
    suiteTangoIdTextField.hide();
    testAreaCombo.hide();
    } else if (radio.getGroupValue() == 'testArea'){
    testTangoIdSearchKeyTextField.hide();
    suiteTangoIdTextField.hide();
    testAreaCombo.show();
    }
    }
    }
    }]
    });


    I get an error Uncaught TypeError: Object #<Object> has no method 'getValue'

    Any help would be greatly appreciated.

    Thanks,
    Rich




  2. #2
    Sencha - Support Team
    Join Date
    Mar 2012
    Location
    Lawrence, KS
    Posts
    211
    Answers
    33
    Vote Rating
    30
    greg.barry has a spectacular aura about greg.barry has a spectacular aura about

      0  

    Default Radio Values

    Radio Values


    You should be able to do something along these lines:

    Code:
    var testSearchCriteria = Ext.create('Ext.form.Panel',{
        items: [{
            xtype: 'radiogroup',
            fieldLabel: 'Test Search Criteria',
            renderTo: Ext.getBody(),
            columns : 1,
            id: 'testSearchCriteria',
            name: 'testSearchCriteria',
            margins : '10 10 10 10',
            items: [
                {boxLabel: 'Test Suite Tango Id', name: 'id-1', inputValue : 'testSuiteTangoId', checked: true},
                {boxLabel: 'Test Case Tango Id', name: 'id-1', inputValue : 'testCaseTangoId'},
                {boxLabel: 'Test Area', name: 'id-1', inputValue : 'testArea'}
            ],
            listeners:{
                change : function(radiogroup,radio){
                    var groupValue = this.getValue()['id-1'];
    
    
                    if(groupValue === 'testSuiteTangoId'){
                        console.log("Radio 1 Checked");
                    } else if(groupValue === 'testCaseTangoId') {
                        console.log("Radio 2 Checked");
                    } else if (groupValue === 'testArea'){
                        console.log("Radio 3 Checked");
                    }
                }
            }
        }]
    });
    Thanks!
    Greg

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi