I have a simple question, even though it has been given me quite a headache.
I have a field container which have some radio fields added to it:
xtype : 'fieldcontainer',
fieldLabel : 'Field type',
defaultType: 'radiofield',
defaults: {
flex: 1
},
items: [
{
boxLabel : 'Plain Text',
name : 'plain-text',
inputValue: 'plain-text',
id : 'plain-text'
}, {
boxLabel : 'Rich Text',
name : 'html-text',
inputValue: 'html-text',
id : 'html-text'
}, {
boxLabel : 'Time',
name : 'time',
inputValue: 'time',
id : 'time'
},
{
boxLabel : 'Typed reference',
name : 'typed-reference',
inputValue: 'typed-reference',
id : 'typed-reference'
},
{
boxLabel : 'Date',
name : 'date',
inputValue: 'date',
id : 'date'
}
],
listeners: {
added: function(radiofield) {
??
}
I tried almost everything inspecting the radiofield object, like iterating its items.items array for added items, however, I only get the integer value of the item, not the object itself. I want to iterate alle items added to the container to set a checked value on a radio field that meets a specific criteria.
use
query([selector])