1. #1
    Touch Premium Member
    Join Date
    Sep 2011
    Posts
    36
    Vote Rating
    0
    frankpeng is on a distinguished road

      0  

    Default Unanswered: Radiofield Event not Triggered in Extjs4 MVC

    Unanswered: Radiofield Event not Triggered in Extjs4 MVC


    Can someone tell me why radiofield event is not triggered in Extjs4 MVC?

    I tried:
    'viewport > casesearch > radiofield'
    'viewport > casesearch radiofield'

    I also tried the line below which returned all 8 radiofields on the panel. So the code should know the radiofields are there.
    Ext.ComponentQuery.query('casesearch > radiofield');

    Thanks


    controller:
    Code:
            this.control({
                //'casesearch button'   :{                                  //working for all button
                'casesearch button[id=searchbtnimage_id]'   :{                
                    click: this.onCaseSearchBtnClick               ////working
                } ,
                 'casesearch > radiofield' :     //none working
                 {
                    uncheck : function(data){ alert("abc1"); },
                    checked : function(data){ alert("abc2"); },
                    handler : function(data){ alert("abc3"); },
                    click : function(data){ alert("abc4"); },
                    change : function(data){ alert("abc5"); }
                 }
    
            });
    View:

    Code:
    Ext.define('SC.view.case_search.Case_search', {
        extend: 'Ext.panel.Panel',
        alias : 'widget.casesearch',    
        id:  'casesearch_id',
        title: 'case search',
        
        initComponent: function() {
      
            this.callParent(arguments);
        },
    
        items: [
            {                
                items: [  
                     { 
                        xtype: 'fieldcontainer',    //simplified.  In real case, this is in a fieldset which is on a panel.
                        fieldLabel : 'user', 
                        defaultType: 'radiofield',   
                        layout: 'column',
                        items: [   
                            {
                                id: 'rd_loginname_0a',
                                boxLabel  : 'all cases'
                                name      : 'FilterLoginName',
                                columnWidth: .2    
                            },
                            {
                                id: 'rd_loginname_1a',
                                boxLabel  : 'my cases only',
                                name      : 'FilterLoginName',
                                columnWidth: .3    
                            }
                        ]  
                     }
                ]            
            }
        ]
    });

  2. #2
    Touch Premium Member
    Join Date
    Sep 2011
    Posts
    36
    Vote Rating
    0
    frankpeng is on a distinguished road

      0  

    Default


    I reviewed this post. http://www.sencha.com/forum/showthre...-in-radiofield

    It is essentially doing what I did. But, mine doesn't work.