Estoy desarollando una aplicación apoyada en este framework y quisiera saber si es posible que al seleccionar un registro en un combobox, el valor pueda ser editado y se actualice autamaticamente la data.
- Código: Seleccionar todo
***Definición del Combobox***
{
xtype: 'combobox',
id:me.ID_COMBO_TIPOTRABAJO,
fieldLabel: 'Tipo de trabajo',
labelWidth: 85 ,
width:350,
store:storeTipoTrabajo ,
editable:true,
typeAhead: true,
selectOnFocus: true,
forceSelect: true,
lazyRender: true,
emptyText: 'Introduzca el tipo de trabajo',
listClass: 'x-combo-list-small',
displayField:'trabaDesctipo',
valueField:'trabaCodtipo',
pageSize :25,
triggerAction:'all',
queryMode: 'remote',
tpl: new Ext.XTemplate(
'<ul>',
'<tpl for=".">',
'<li role="option" class="x-boundlist-item" >',
'<tpl if="trabaCodtipo">',
'<span style="font-family:Courier New; color:#000022;">{trabaCodtipo} - </span>',
'</tpl>',
'<tpl if="!trabaCodtipo">',
'<span style="font-family:Courier New; color:#000022;">*** - </span>',
'</tpl>',
'{trabaDesctipo}',
'</li>',
'</tpl>',
'</ul>'
),
listeners: {
'blur': function(){
var filtro = Ext.getCmp(me.ID_FILTRAR_TIPOTRABAJO);
if (storeTipoTrabajo.getCount() == 0)
{
var gridSeccion = Ext.getCmp(me.ID_GRID_SECCION);
if (filtro.rawValue != "")
{
Ext.Msg.show({
buttons: Ext.Msg.OK,
icon: Ext.Msg.WARNING,
title: 'Alerta',
msg: "No hay tipo de trabajo: "+filtro.rawValue,
fn: function (btn, text) {
filterSeccion("", gridSeccion, storeTipoTrabajo);
}
});
} else {
filterSeccion("", gridSeccion, storeTipoTrabajo);
}
}
//filtro.hide();
//filtro.clearValue();
},
scope: me,
'select': function(field, values, options) {
if (values.length >0) {
var value = values[0];
var combo = Ext.getCmp(me.ID_COMBO_TIPOTRABAJO).getRawValue();
var gridSeccion = Ext.getCmp(me.ID_GRID_SECCION);
var codTipoTrab= value.get('trabaCodtipo')+ "";
gridSeccion.setTitle(combo);
storeTmpSeccion.filters.clear();
storeTmpSeccion.filter(new Ext.util.Filter({
property: "pk.codTipoTrab",
value:codTipoTrab.trim(),
anyMatch: false,
exactMatch: false,
caseSensitive: true
}));
}
}
}

