
listaValores = function(config){ 

	this.dh 	= Ext.DomHelper;
	// captura la configuracion para los metodos 
	this.config = config;

	// crea el elemento para el dialogo
	el = this.dh.append(document.body, {tag: 'div' }, true);
	YAHOO.util.Dom.generateId(el);
	
	// crea los elementos para el dialogo
	this.hd = this.dh.append(el.id , {tag: 'div', cls : 'x-dlg-hd' }, true);
	YAHOO.util.Dom.generateId(this.hd);
	this.hd.update(this.config.ventana.titulo);

	this.bd  	= this.dh.append(el.id 	   ,  {tag: 'div', cls : 'x-dlg-bd'  }, true);
	this.td  	= this.dh.append(this.bd.id,  {tag: 'div', cls : 'x-dlg-tab'  , title : this.config.ventana.titulo }, true);
	this.intd  	= this.dh.append(this.td.id,  {tag: 'div', cls : 'inner-tab'}, true);
	
	// invoca al constructor BasicDialog
	listaValores.superclass.constructor.call(this, el.id, this.config.dialog);

	// agrega botones aceptar cancelar 
	this.btnAceptar   = this.addButton('Aceptar' , this.config.fncAceptar , this); // this.aceptar
	this.btnCancela   = this.addButton('Cancelar', this.hide, this);
	

	// crea el elemento para el grid
	this.gd  	= this.dh.append(this.intd.dom ,{tag: 'div', style :'border:1px solid #99bbe8;overflow: hidden; height: 395px;'}, true);
	
	// personaliza el mensaje de cargar grid	
	Ext.LoadMask.prototype.msg = 'Cargando ' + this.config.ventana.titulo.toLowerCase();
	this.Grid   = new grid(this.gd.id, this.config.grid);

	this.Grid.ds.load(this.config.grid.proxy);

	if (config.filtro){
		/*this.tb = this.grid.getView().getPageToolbar();
	
		this.btnFilter = Ext.DomHelper.append(this.tb.el.dom, {
			tag:'input', type:'button', size:'12', value: config.filtro.etiquetaBoton}, true);
		
		this.txtFilter = Ext.DomHelper.append(this.tb.el.dom, {
			tag:'input', type:'text', size:'12'}, true);
			
		this.btnFilter.on('click', this.muestraResultados.createDelegate(this));
		
		this.tb.add(config.filtro.etiquetaInput, this.txtFilter.dom, '  ', ' ', this.btnFilter.dom); */	
	}
	

	this.on('hide', this.destruir, this, true);
};


Ext.extend(listaValores, Ext.BasicDialog, {
			  
	muestraResultados: function(){
		/*
		var baseParams =  '{ "' + this.config.webService.param  +   '":"' + this.txtFilter.dom.value + '" }' ;
		this.dm.baseParams =  Ext.util.JSON.decode(baseParams);
		this.dm.loadPage(1);
		*/
	},
	destruir : function(){
		this.destroy(true);
	}
	
} );


