1. #1
    Sencha User luisparada's Avatar
    Join Date
    Nov 2007
    Location
    Venezuela
    Posts
    94
    Vote Rating
    2
    luisparada is on a distinguished road

      0  

    Default Combobox dropdown list with less width that the ne defined by the combobox [SOLVED]

    Combobox dropdown list with less width that the ne defined by the combobox [SOLVED]


    The dropdown list of all combos inside a form that is inside a tabpanel is not rendering as it should be. Please give me some advice to fix this. Here is the function that constructs the panel, but the bold text is the one I am having problems with. The problem is that the list is not filling the width of the combobox it shows the list with less width that the one defined in the combobox.
    Code:
    getForm: function(id){
    		var desktop 		= this.app.getDesktop();
    		var currentModule	= this;
    
    		/**************************************************************************/
    		/* Form  Fields										  */
    		/**************************************************************************/
    		
    		
    		/**************************************************************************/
    		/* Define Foreing Key With sb46                                           */
    		/**************************************************************************/
    			var sb46Module   = this.app.getModule('xs-sb46');
    			var sb46_storage = sb46Module.initAuxStore();
    			sb46_storage.load();
    
    		/**************************************************************************/
    		/* Define ComboBox For Key sb46                                           */
    		/**************************************************************************/
                var oficina_fld_tpl = new Ext.XTemplate(
    				'<tpl for="."><div class="search-item">',
    					'<h4><span>{codigo_oficina_fld} - {nombre_oficina_fld}</span></h3>',
    				'</div></tpl>'
    			);
    			
    			var oficina_fld = new Ext.form.ComboBox({
    				fieldLabel:'Oficina',
    				hiddenName: 'oficina_fld',
    				store: currentModule.sb46_auxstorage,
    				id:'oficina_fld_id_at05',
    				valueField:'codigo_oficina_fld',
    				displayField:'nombre_oficina_fld',
    				typeAhead: true,
    				loadingText: 'Buscando...',
    				width: 250,
    				pageSize:10,
    				hideTrigger:false,
    				minChars:1,
    				tpl: oficina_fld_tpl,
    				itemSelector: 'div.search-item',
    				emptyText:"Introduzca un nombre de Oficina",
    				triggerAction: 'all',
    				listeners:{
    					'select':function(e,v){
    						
    					}
    					
    				}
    			});
                
    			/*var oficina_fld = new Ext.form.ComboBox({
    				mode: 'remote',
    				store: currentModule.sb46_storage,
    				displayField : 'nombre_oficina_fld',
    				valueField : 'codigo_oficina_fld',
    				fieldLabel: 'Oficina',
    				typeAhead: true,
    				hiddenName: 'oficina_fld',
    				triggerAction: 'all',
    				emptyText:'Seleccione..',
    				selectOnFocus:true,
    				forceSelection :false,
    				id:'sb46_fld_id_at05',
    				editable : true,
    				autoLoad:true, 
    				width:235,
    				height:20,
    				allowBlank:false
    			});*/
    
    		/**************************************************************************/
    		/* End of Define Foreing Key With sb46                                     */
    		/**************************************************************************/
    
    		/**************************************************************************/
    		/* Define Foreing Key With sb07                                           */
    		/**************************************************************************/
    			var sb07Module   = this.app.getModule('xs-sb07');
    			var sb07_storage = sb07Module.initMainStore();
    			sb07_storage.load();
    
    		/**************************************************************************/
    		/* Define ComboBox For Key sb07                                           */
    		/**************************************************************************/
    
    			var categoria_captacion_fld = new Ext.form.ComboBox({
    				mode: 'remote',
    				store: currentModule.sb07_storage,
    				displayField : 'nombre_captacion_fld',
    				valueField : 'categoria_captacion_fld',
    				fieldLabel: 'Categor\u00eda captaci\u00f3n',
    				typeAhead: true,
    				hiddenName: 'categoria_captacion_fld',
    				triggerAction: 'all',
    				emptyText:'Seleccione..',
    				selectOnFocus:true,
    				forceSelection :false,
    				id:'sb07_fld_id_at05',
    				editable : true,
    				autoLoad:true, 
    				width:210,
    				height:20,
    				allowBlank:false
    			});
    
    		/**************************************************************************/
    		/* End of Define Foreing Key With sb07                                     */
    		/**************************************************************************/
    
    		/**************************************************************************/
    		/* Define Foreing Key With sb08                                           */
    		/**************************************************************************/
    			var sb08Module   = this.app.getModule('xs-sb08');
    			var sb08_storage = sb08Module.initMainStore();
    			sb08_storage.load();
    
    		/**************************************************************************/
    		/* Define ComboBox For Key sb08                                           */
    		/**************************************************************************/
    
    			var instrumento_captacion_fld = new Ext.form.ComboBox({
    				mode: 'remote',
    				store: currentModule.sb08_storage,
    				displayField : 'nombre_instrumento_captacion_fld',
    				valueField : 'codigo_instrumento_captacion_fld',
    				fieldLabel: 'Instrumento captaci\u00f3n',
    				typeAhead: true,
    				hiddenName: 'instrumento_captacion_fld',
    				triggerAction: 'all',
    				emptyText:'Seleccione..',
    				selectOnFocus:true,
    				forceSelection :false,
    				id:'sb08_fld_id_at05',
    				editable : true,
    				autoLoad:true, 
    				width:210,
    				height:20,
    				allowBlank:false
    			});
    
    		/**************************************************************************/
    		/* End of Define Foreing Key With sb08                                     */
    		/**************************************************************************/
    
    		/**************************************************************************/
    		/* Define Foreing Key With sb15                                           */
    		/**************************************************************************/
    			var sb15Module   = this.app.getModule('xs-sb15');
    			var sb15_storage = sb15Module.initMainStore();
    			sb15_storage.load();
    
    		/**************************************************************************/
    		/* Define ComboBox For Key sb15                                           */
    		/**************************************************************************/
    
    			var moneda_fld = new Ext.form.ComboBox({
                        mode: 'remote',
                        store: currentModule.sb15_storage,
                        displayField : 'nombre_moneda_fld',
                        valueField : 'codigo_moneda_fld',
                        fieldLabel: 'Moneda',
                        typeAhead: true,
                        hiddenName: 'moneda_fld',
                        triggerAction: 'all',
                        emptyText:'Seleccione..',
                        selectOnFocus:true,
                        forceSelection :false,
                        id:'sb15_fld_id_at05',
                        editable : true,
                        autoLoad:true, 
                        width:210,
                        height:20,
                        allowBlank:false
    			});
    
    		/**************************************************************************/
    		/* End of Define Foreing Key With sb15                                     */
    		/**************************************************************************/
    
    		/**************************************************************************/
    		/* Define Foreing Key With sb16                                           */
    		/**************************************************************************/
    			var sb16Module   = this.app.getModule('xs-sb16');
    			var sb16_storage = sb16Module.initMainStore();
    			sb16_storage.load();
    
    		/**************************************************************************/
    		/* Define ComboBox For Key sb16                                           */
    		/**************************************************************************/
    
    			var tipo_cliente_fld = new Ext.form.ComboBox({
                        mode: 'remote',
                        store: currentModule.sb16_storage,
                        displayField : 'nombre_tipo_cliente_fld',
                        valueField : 'codigo_tipo_cliente_fld',
                        fieldLabel: 'Tipo cliente',
                        typeAhead: true,
                        hiddenName: 'tipo_cliente_fld',
                        triggerAction: 'all',
                        emptyText:'Seleccione..',
                        selectOnFocus:true,
                        forceSelection :false,
                        id:'sb16_fld_id_at05',
                        editable : true,
                        autoLoad:true, 
                        width:210,
                        height:20,
                        allowBlank:false
    			});
    
    		/**************************************************************************/
    		/* End of Define Foreing Key With sb16                                     */
    		/**************************************************************************/
    
    			var id_cliente_fld = new Ext.form.TextField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'ID Cliente', name: 'id_cliente_fld', id: 'id_cliente_fld_id_at05',
    				allowBlank:false , maxLength : 19  , vtype:'alfaNumWSpc', width: 210     });
    
    		/**************************************************************************/
    		/* Define Foreing Key With sb59                                           */
    		/**************************************************************************/
    			var sb59Module   = this.app.getModule('xs-sb59');
    			var sb59_storage = sb59Module.initMainStore();
    			sb59_storage.load();
    
    		/**************************************************************************/
    		/* Define ComboBox For Key sb59                                           */
    		/**************************************************************************/
    
    			var genero_cliente_fld = new Ext.form.ComboBox({
                        mode: 'remote',
                        store: currentModule.sb59_storage,
                        displayField : 'descripcion_genero_fld',
                        valueField : 'codigo_genero_fld',
                        fieldLabel: 'G\u00e9nero cliente',
                        typeAhead: true,
                        hiddenName: 'genero_cliente_fld',
                        triggerAction: 'all',
                        emptyText:'Seleccione..',
                        selectOnFocus:true,
                        forceSelection :false,
                        id:'sb59_fld_id_at05',
                        editable : true,
                        autoLoad:true, 
                        width:210,
                        height:20,
                        allowBlank:false
    			});
    
    		/**************************************************************************/
    		/* End of Define Foreing Key With sb59                                     */
    		/**************************************************************************/
    
    		/**************************************************************************/
    		/* Define Foreing Key With sb03                                           */
    		/**************************************************************************/
    			var sb03Module   = this.app.getModule('xs-sb03');
    			var sb03_storage = sb03Module.initMainStore();
    			sb03_storage.load();
    
    		/**************************************************************************/
    		/* Define ComboBox For Key sb03                                           */
    		/**************************************************************************/
    
    			var pais_cliente_fld = new Ext.form.ComboBox({
    				mode: 'remote',
    				store: currentModule.sb03_storage,
    				displayField : 'nombre_pais_fld',
    				valueField : 'codigo_pais_fld',
    				fieldLabel: 'Pa\u00eds (Nacionalidad)',
    				typeAhead: true,
    				hiddenName: 'pais_cliente_fld',
    				triggerAction: 'all',
    				emptyText:'Seleccione..',
    				selectOnFocus:true,
    				forceSelection :false,
    				id:'sb03_fld_id_at05',
    				editable : true,
    				autoLoad:true, 
    				width:210,
    				height:20,
    				allowBlank:false
    			});
    
    		/**************************************************************************/
    		/* End of Define Foreing Key With sb03                                     */
    		/**************************************************************************/
    
    			var nombre_cliente_fld = new Ext.form.TextField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Nombre cliente', name: 'nombre_cliente_fld', id: 'nombre_cliente_fld_id_at05',
    				allowBlank:false , maxLength : 50  , vtype:'alfaNumWSpc', width : 210     });
    
    			var cuenta_cliente_fld = new Ext.form.TextField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Cuenta cliente', name: 'cuenta_cliente_fld', id: 'cuenta_cliente_fld_id_at05',
    				allowBlank:false , maxLength : 20  , vtype:'alfaNumWSpc' , width : 210    });
    
    			var portafolio_fld = new Ext.form.TextField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Portafolio', name: 'portafolio_fld', id: 'portafolio_fld_id_at05',
    				allowBlank:false , maxLength : 20  , vtype:'alfaNumWSpc' , width : 210    });
    
    		/**************************************************************************/
    		/* Define Foreing Key With sb28                                           */
    		/**************************************************************************/
    			var sb28Module   = this.app.getModule('xs-sb28');
    			var sb28_storage = sb28Module.initMainStore();
    			sb28_storage.load();
    
    		/**************************************************************************/
    		/* Define ComboBox For Key sb28                                           */
    		/**************************************************************************/
    
    			var ente_publico_fld = new Ext.form.ComboBox({
    				mode: 'remote',
    				store: currentModule.sb28_storage,
    				displayField : 'nombre_del_organismo_fld',
    				valueField : 'codigo_ont_fld',
    				fieldLabel: 'Ente p\u00fablico',
    				typeAhead: true,
    				hiddenName: 'ente_publico_fld',
    				triggerAction: 'all',
    				emptyText:'Seleccione..',
    				selectOnFocus:true,
    				forceSelection :false,
    				id:'sb28_fld_id_at05',
    				editable : true,
    				autoLoad:true, 
    				width:210,
    				height:20,
    				allowBlank:false
    			});
    
    		/**************************************************************************/
    		/* End of Define Foreing Key With sb28                                     */
    		/**************************************************************************/
    
    		/**************************************************************************/
    		/* Define Foreing Key With sb44                                           */
    		/**************************************************************************/
    			var sb44Module   = this.app.getModule('xs-sb44');
    			var sb44_storage = sb44Module.initMainStore();
    			sb44_storage.load();
    
    		/**************************************************************************/
    		/* Define ComboBox For Key sb44                                           */
    		/**************************************************************************/
    
    			var escala_fld = new Ext.form.ComboBox({
    				mode: 'remote',
    				store: currentModule.sb44_storage,
    				displayField : 'descripcion_rango_fld',
    				valueField : 'codigo_rango_fld',
    				fieldLabel: 'Escala',
    				typeAhead: true,
    				hiddenName: 'escala_fld',
    				triggerAction: 'all',
    				emptyText:'Seleccione..',
    				selectOnFocus:true,
    				forceSelection :false,
    				id:'sb44_fld_id_at05',
    				editable : true,
    				autoLoad:true, 
    				width:210,
    				height:20,
    				allowBlank:false
    			});
    
    		/**************************************************************************/
    		/* End of Define Foreing Key With sb44                                     */
    		/**************************************************************************/
    
    			var cantidad_de_cuentas_fld = new Ext.form.NumberField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Cantidad de cuentas', name: 'cantidad_de_cuentas_fld', id: 'cantidad_de_cuentas_fld_id_at05',
    				allowBlank:false , width : 210       });
    
    			var cantidad_de_clientes_fld = new Ext.form.NumberField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Cantidad de clientes', name: 'cantidad_de_clientes_fld', id: 'cantidad_de_clientes_fld_id_at05',
    				allowBlank:false , width : 210     });
    
    			var saldo_fld = new Ext.form.NumberField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Saldo', name: 'saldo_fld', id: 'saldo_fld_id_at05',
    				allowBlank:false , width : 210    , allowNegative : true, allowDecimals : true   });
    
    			var saldo_inicial_fld = new Ext.form.NumberField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Saldo inicial', name: 'saldo_inicial_fld', id: 'saldo_inicial_fld_id_at05',
    				allowBlank:false , width : 210    , allowNegative : true, allowDecimals : true   });
    
    			var tipo_cambio_fld = new Ext.form.NumberField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Tipo cambio', name: 'tipo_cambio_fld', id: 'tipo_cambio_fld_id_at05',
    				allowBlank:false , width : 210    , allowNegative : false, allowDecimals : true   });
    
    			var tasa_fld = new Ext.form.NumberField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Tasa', name: 'tasa_fld', id: 'tasa_fld_id_at05',
    				allowBlank:true , width : 210    , allowDecimals : true, decimalPrecision : 4, decimalSeparator : '.' , allowNegative : false   });
    
    			var intereses_fld = new Ext.form.NumberField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Intereses', name: 'intereses_fld', id: 'intereses_fld_id_at05',
    				allowBlank:true , width : 210    , allowDecimals : true, decimalPrecision : 4, decimalSeparator : '.' , allowNegative : true   });
    
    			var fecha_ultimo_mov_fld = new Ext.form.TextField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Fecha \u00faltimo movimiento', name: 'fecha_ultimo_mov_fld', id: 'fecha_ultimo_mov_fld_id_at05',
    				allowBlank:false , width : 210 , maxLength : 8  , vtype:'alfaNumWSpc'     });
    
    		/**************************************************************************/
    		/* Define Foreing Key With sb29                                           */
    		/**************************************************************************/
    			var sb29Module   = this.app.getModule('xs-sb29');
    			var sb29_storage = sb29Module.initMainStore();
    			sb29_storage.load();
    
    		/**************************************************************************/
    		/* Define ComboBox For Key sb29                                           */
    		/**************************************************************************/
    
    			var tipo_movimiento_fld = new Ext.form.ComboBox({
    				mode: 'remote',
    				store: currentModule.sb29_storage,
    				displayField : 'nombre_movimiento_deposito_fld',
    				valueField : 'codigo_movimiento_deposito_fld',
    				fieldLabel: 'Tipo movimiento',
    				typeAhead: true,
    				hiddenName: 'tipo_movimiento_fld',
    				triggerAction: 'all',
    				emptyText:'Seleccione..',
    				selectOnFocus:true,
    				forceSelection :false,
    				id:'sb29_fld_id_at05',
    				editable : true,
    				autoLoad:true, 
    				width:210,
    				height:20,
    				allowBlank:false
    			});
    
    		/**************************************************************************/
    		/* End of Define Foreing Key With sb29                                     */
    		/**************************************************************************/
    
    			var monto_ultimo_mov_fld = new Ext.form.NumberField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Monto \u00faltimo movimiento', name: 'monto_ultimo_mov_fld', id: 'monto_ultimo_mov_fld_id_at05',
    				allowBlank:false , width : 210    , allowNegative : true, allowDecimals : true   });
    
    		/**************************************************************************/
    		/* Define Foreing Key With sb30                                           */
    		/**************************************************************************/
    			var sb30Module   = this.app.getModule('xs-sb30');
    			var sb30_storage = sb30Module.initMainStore();
    			sb30_storage.load();
    
    		/**************************************************************************/
    		/* Define ComboBox For Key sb30                                           */
    		/**************************************************************************/
    
    			var periodicidad_intereses_fld = new Ext.form.ComboBox({
    				mode: 'remote',
    				store: currentModule.sb30_storage,
    				displayField : 'nombre_periodicidad_fld',
    				valueField : 'codigo_periodicidad_fld',
    				fieldLabel: 'Periodicidad intereses',
    				typeAhead: true,
    				hiddenName: 'periodicidad_intereses_fld',
    				triggerAction: 'all',
    				emptyText:'Seleccione..',
    				selectOnFocus:true,
    				forceSelection :false,
    				id:'sb30_fld_id_at05',
    				editable : true,
    				autoLoad:true, 
    				width:210,
    				height:20,
    				allowBlank:false
    			});
    
    		/**************************************************************************/
    		/* End of Define Foreing Key With sb30                                     */
    		/**************************************************************************/
    
    		/**************************************************************************/
    		/* Define Foreing Key With sb31                                           */
    		/**************************************************************************/
    			/*var sb31Module   = this.app.getModule('xs-sb31');
    			var sb31_storage = sb31Module.initMainStore();
    			sb31_storage.load();
    
    		/**************************************************************************/
    		/* Define ComboBox For Key sb31                                           */
    		/**************************************************************************/
    
    			var reinversion_fld = new Ext.form.ComboBox({
    				mode: 'remote',
    				store: currentModule.sb31_storage,
    				displayField : 'descripcion_indicador_fld',
    				valueField : 'codigo_indicador_fld',
    				fieldLabel: 'Reinversi\u00f3n',
    				//typeAhead: true,
    				hiddenName: 'reinversion_fld',
    				triggerAction: 'all',
    				emptyText:'Seleccione..',
    				//selectOnFocus:true,
    				forceSelection :false,
    				id:'reinversion_fld_id_at05',
    				editable : true,
    				autoLoad:true, 
    				width:210,
    				allowBlank:false
    			});
    
    		/**************************************************************************/
    		/* End of Define Foreing Key With sb31                                     */
    		/**************************************************************************/
    
    			var documento_fld = new Ext.form.TextField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Documento', name: 'documento_fld', id: 'documento_fld_id_at05',
    				allowBlank:false , width : 210, maxLength : 18  , vtype:'alfaNumWSpc'     });
    
    			var fecha_inicio_fld = new Ext.form.TextField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Fecha inicio', name: 'fecha_inicio_fld', id: 'fecha_inicio_fld_id_at05',
    				allowBlank:true , width : 210, maxLength : 8  , vtype:'alfaNumWSpc'     });
    
    			var fecha_vencimiento_fld = new Ext.form.TextField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Fecha vencimiento', name: 'fecha_vencimiento_fld', id: 'fecha_vencimiento_fld_id_at05',
    				allowBlank:true , width : 210, maxLength : 8  , vtype:'alfaNumWSpc'     });
    
    		/**************************************************************************/
    		/* Define Foreing Key With sb24                                           */
    		/**************************************************************************/
    			var sb24Module   = this.app.getModule('xs-sb24');
    			var sb24_storage = sb24Module.initMainStore();
    			sb24_storage.load();
    
    		/**************************************************************************/
    		/* Define ComboBox For Key sb24                                           */
    		/**************************************************************************/
    
    			var tipo_fideicomiso_fld = new Ext.form.ComboBox({
    				mode: 'remote',
    				store: currentModule.sb24_storage,
    				displayField : 'nombre_tipo_fideicomiso_fld',
    				valueField : 'codigo_tipo_fideicomiso_fld',
    				fieldLabel: 'Tipo fideicomiso',
    				typeAhead: true,
    				hiddenName: 'tipo_fideicomiso_fld',
    				triggerAction: 'all',
    				emptyText:'Seleccione..',
    				selectOnFocus:true,
    				forceSelection :false,
    				id:'tipo_fideicomiso_fld_id_at05',
    				editable : true,
    				autoLoad:true, 
    				width:210,
    				allowBlank:false
    			});
    
    		/**************************************************************************/
    		/* End of Define Foreing Key With sb24                                     */
    		/**************************************************************************/
    
    			var beneficiarios_fld = new Ext.form.NumberField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Beneficiarios', name: 'beneficiarios_fld', id: 'beneficiarios_fld_id_at05',
    				allowBlank:false  , width : 210      });
    
    			var fideicomitentes_fld = new Ext.form.NumberField({
    				//labelStyle: 'display: none',
    				fieldLabel: 'Fideicomitentes', name: 'fideicomitentes_fld', id: 'fideicomitentes_fld_id_at05',
    				allowBlank:true  , width : 210      });
    
    		
    		// observacion colocar el valor de -1 al campo id_fld 
    		/**************************************************************************/
    		/* End of Form Add Fields												  */
    		/**************************************************************************/
                var panelClientes = new Ext.form.FieldSet({
                    border:true,
                    id:'panel_clientes_id_at05',
                    title:'Datos de Cliente',			
                    items:[{
                        layout:'column',
                        border:false,
                        items:[{ 
                                columnWidth:.3,
                                layout:'form',
                                border:false,
                                items:[oficina_fld]
                            }]
                    },{
                        layout:'column',
                        border:false,
                        items:[{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[categoria_captacion_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[instrumento_captacion_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[moneda_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[tipo_cliente_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[id_cliente_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[genero_cliente_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[pais_cliente_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[nombre_cliente_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[cuenta_cliente_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[portafolio_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[ente_publico_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[escala_fld]
                            }]
                        }]		
                });
                
                var panelCuentas = new Ext.form.FieldSet({
                    border:true,
                    id:'panel_cuentas_id_at05',
                    title:'Datos de Cuentas',			
                    items:[{
                        layout:'column',
                        border:false,
                        items:[{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[cantidad_de_cuentas_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[cantidad_de_clientes_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[saldo_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[saldo_inicial_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[tipo_cambio_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[tasa_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[intereses_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[fecha_ultimo_mov_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[tipo_movimiento_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[monto_ultimo_mov_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[periodicidad_intereses_fld]
                            },{
                                columnWidth:.25,
                                layout:'form',
                                border:false,
                                items:[reinversion_fld]
                            }]
                        }]		
                });
    		
            /**********************************************************************/
    		/* Tab form with added fields										  */
    		/**********************************************************************/
    		
                var formTabs = new Ext.TabPanel({
                    deferredRender:false,
                    activeTab: 0, //'hlpPanel',
                    layoutOnTabChange : true,
                    defaults:{
                        frame:true,
                        height:260, width:750,
                        layout:'fit'
                    },
                    items:[{
                        title:'Datos de Clientes', id:'panel_clientes_at05',
                        items:[panelClientes]
                    },{
                        title: 'Datos de Cuenta', id:'panel_cuentas_at05',
                        items:[panelCuentas]
                    }],
                    listeners :{
                        beforeshow: function(e){ e.doLayout() }
                    }			
                });
    		/**************************************************************************/
    		/* DefiniciĆ³n del Formulario 			 								  */
    		/* Formulario de at05								  		  */
    		/**************************************************************************/
    		this.form_instance = new Ext.form.FormPanel({
    			labelAlign: 'top',
    			id: 'at05_form',
                border:false,
    			shadow: false,
    			shadowOffset: 0,
    			layout:'form',
    			url: this.app.connection,
    			// configure how to read the JSON Data
    			reader: new Ext.data.JsonReader({
    				totalProperty: "results",    // The property which contains the total dataset size (optional)
    				root: "rows",                // The property which contains an Array of row objects
    				id: "id" 	           			
    			}, this.getRecordDef())	,
                items:[formTabs],
    			tbar:[{
    				text:'Guardar',
    				id:'at05_new_btn',
    				iconCls : 'icon-accept',
    				tooltip : {title:'Guardar', text:'Agregar / Actualizar Registro'},
    				cls: 'x-btn-text-icon',
    				scope:this,
    				handler: function(){					
    					var current_id 	= Ext.getCmp('at05_fld_id');
    				    if (currentModule.form_instance.form.isValid()) {
    						option = (id_fld.value==-1)?'insert':'update';
    						currentModule.form_instance.form.submit({
    							params: {
    								moduleId	:currentModule.moduleId,
    								fileName	:currentModule.phpFile,
    								action		:'submit',
    								task		: option
    								
    							},
    							waitMsg:'Procesando Solicitud...',
    							reset: false,
    							callback:function(form_instance, action){							
    							},
    							failure: function(form_instance, action){
    								jsresult    = Ext.util.JSON.decode(action.response.responseText);
    								if(jsresult.message){
    									Ext.ux.Toast.msg('Error', jsresult.message);
    								} else {
    									Ext.ux.Toast.msg('Error', 'Ha ocurrido un error de procesamiento.');	
    								}
    							},
    							success: function(form_instance, action, e) {
    						
    								jsresult    = Ext.util.JSON.decode(action.response.responseText);
    								
    								if(jsresult.success){									
    									operacion = (jsresult.op=='insert')?'Insertado':'Actualizado';
    									Ext.ux.Toast.msg('Informaci\u00f3n','Solicitud Procesada\nEl registro se ha '+operacion);
                                       // currentModule.resetDocumentSection();
    									currentModule.store.reload();
    								} else {
    									if(jsresult.message){
    										Ext.ux.Toast.msg('Error', jsresult.message);
    									} else {
    										Ext.ux.Toast.msg('Error', 'Ha ocurrido un error de procesamiento.');	
    									}
    								}
    							} 
    						})						
    					}
    				}		
    			},{
    				text:'Limpiar',
    				id:'at05 _cancel_btn',
    				iconCls : 'icon-minus',
    				tooltip : {title:'Cancelar', text:'Cancelar Operaci\u00F3n'},
    				cls: 'x-btn-text-icon',
    				scope:this,
    				handler: function(){
    					currentModule.form_instance.form.reset();
    				        // currentModule.resetDocumentSection();
                        
    				}		
    			}]			
    			
    		});
    
    
    		return this.form_instance
    
    	},
    Attached Images
    Last edited by luisparada; 4 Feb 2010 at 6:20 AM. Reason: Ambiguous definition. Solved!!!
    ____________________________________
    do not make install, just compile it.!!!
    --------------------------------------------------
    //*************k4m1k4z3************\\

  2. #2
    Sencha User luisparada's Avatar
    Join Date
    Nov 2007
    Location
    Venezuela
    Posts
    94
    Vote Rating
    2
    luisparada is on a distinguished road

      0  

    Default


    Ok, As i suspect the listWidth config option must be defined because if it's not, the Ext will not implicit define this option for us. So all I did was to set the listWidth option to the width of the combo. That's all.
    ____________________________________
    do not make install, just compile it.!!!
    --------------------------------------------------
    //*************k4m1k4z3************\\