I want to be able to change a specific value in my data
data : {"active" : 'Y', 'label': 'Don't change this'},
action : 'autoBandActive',
margin: '0 0 10 0',
tpl : new Ext.XTemplate(
'<div class="row">',
'<div class="pay-label" data-qtip="{label}">{label}</div>',
'<tpl if="active == \'Y\'">',
'<span class="active">Active</span>',
'<tpl else>',
'<span class="inactive">Inactive</span>',
'</tpl>',
'</div>'
)
in controller tpl.setData({"active": 'N'}
, but the label gets deleted. I don't want to do this tpl.setData({"active": 'N', 'label', 'new-label'}
. I just want to change the active variable
Assuming that you mean
component.setData()
and nottpl.setData()
, then you would do something like:Fiddle