Results 1 to 3 of 3

Thread: Checkbox in my fieldset is checked ?

  1. #1

    Default Checkbox in my fieldset is checked ?

    Hello ,

    I'd like to know if my fielset to integrate checkbox is checked or not

    I tried several thing but impossible to retrieve the value.


    I ask the advice of an expert to guide me please.couter
    Lire phontiquement


    small code of my element :
    Code:
     ,items:[{
                                           xtype:'fieldset',
                                             defaultType: 'checkbox', 
                                             anchor:'100%', 
                                             autoHeight:true
                                            ,items:[{
                                                    boxLabel:'Sortir du mode maintenance tous les tests',
                                                    name: 'alltest',
                        }]
                                    },
    



    Code:
    hobbit.Off = Ext.extend(Ext.Window, {
        constructor: function(config) {
    
       config = Ext.apply({
           
                                id:'fs2col-winoff'
                            ,width:500
                            ,minWidth:280
                            ,height:320
                            ,minHeight:180
                            ,modal : true
                            ,layout:'fit'
                            ,border:false
                            ,closable:true
                            ,collapsible:false
                            ,listeners : {
                                  close : function(n) {
                                     Ext.getCmp('fs2col-formoff').getForm().reset();
                                     Ext.getCmp('tabpanel').activeTab.getSelectionModel().clearSelections();
                                       this.destroy();
                                  }
                            }
                            ,title: 'Sortie du mode maintenance'
                            ,items:{
    
                                     id:'fs2col-formoff'
                                    ,xtype:'form'
                                    ,layout:'vbox'
                                    ,layoutConfig: {
                                          align : 'stretch',
                                          pack  : 'start',
                                     }
                                    ,frame:true
                                    ,labelWidth:50
                                    ,defaults:{
                                             columnWidth:0.5
                                            ,layout:'form'
                                            ,hideLabels:true
                                            ,border:false
                                            ,bodyStyle:'padding:4px'
                                    }
    
                                    ,items:[{
                                           xtype:'fieldset',
                                             defaultType: 'checkbox', 
                                             anchor:'100%', 
                                             autoHeight:true
                                            ,items:[{
                                                    boxLabel:'Sortir du mode maintenance tous les tests',
                                                    name: 'alltest',
                        }]
                                    },{
                            
                                     defaults:{ 
                                            xtype:'fieldset',
                                            layout:'form', 
                                            anchor:'100%', 
                                            autoHeight:true
                                    }
                                    ,items:[{
                                    
                                         title:'Sortir seulement un test du mode maintenance'
                                        ,defaultType:'textfield'
                                        ,id : 'alltestoff'
                                        ,defaults:{anchor:'-20', allowBlank:true}
                                        ,items:[{
                                              fieldLabel:'Nom test'
                                              
                                        }]
                                    }]
                        },{
                            
                                     defaults:{
                                           xtype:'fieldset',
                                            layout:'form', 
                                            anchor:'100%', 
                                            autoHeight:true
                                    }
                                    ,items:[{
                                    
                                         defaultType:'textfield'
                                        ,defaults:{anchor:'-20', allowBlank:true}
                                        ,items:[{
                                                xtype: 'label',
                                                text: 'Deux choix sont  possibles, soit de mettre en maintenance tous les tests, soit d\'entrer le nom du test a mettre en maintenance.'
                                        }]
                                 }]
                        }],
                },
                buttons: [{ 
                                        text: 'Valider',
                                        handler : function() {
                                          // Action delegate
                                        }
                                   },{
                                        text: 'Annuler',
                                        handler: function() {
                                          Ext.getCmp('fs2col-formoff').getForm().reset();
                                          Ext.getCmp('tabpanel').activeTab.getSelectionModel().clearSelections();
                                          Ext.getCmp('fs2col-winoff').destroy();
                                        }
                                    }]
                            
    
        
           }, config);
    
    hobbit.Off.superclass.constructor.call(this, config);
        
    }
    
      
        
    });

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    Code:
    var checked = Ext.getCmp('fs2col-formoff').getForm().findField('alltest').getValue();

  3. #3

    Default

    Quote Originally Posted by Condor View Post
    Code:
    var checked = Ext.getCmp('fs2col-formoff').getForm().findField('alltest').getValue();

    You are a killer

    Thank you

Similar Threads

  1. Replies: 2
    Last Post: 22 Jul 2010, 6:33 AM
  2. Replies: 2
    Last Post: 28 Jun 2010, 11:12 AM
  3. Replies: 0
    Last Post: 28 Jun 2010, 8:50 AM
  4. the checkbox is not checked
    By rimbaudsolaris in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 20 May 2010, 9:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •