PDA

View Full Version : How to referense Checkbox inside of CheckboxGroup



igald
1 Mar 2010, 10:35 AM
I can update the Checkbox fields with XML data, but it doesn't work when I put the Checkbox inside of CheckBoxGroup but use the same checkbox name. What name should I use for Checkbox inside CheckboxGroup when I pass it to XmlReader (marked in red)?



var cbg = new Ext.form.CheckboxGroup({
id: 'cbg',
name: 'cbg',
fieldLabel: 'Group',

columns: 3,
items: [
{boxLabel: 'Option 1', name: 'opt1'},
{boxLabel: 'Option 2', name: 'opt2'},
{boxLabel: 'Option 3', name: 'opt3'},
],
disabled: disabled
});

var formPanel = new Ext.form.FormPanel({
reader : new Ext.data.XmlReader({
record : 'sample',
success: '@success'
}, [ 'opt1','opt2','opt3']),
items: [
cbg, ... ]