title: Extjs 4, forms with checkboxes and loadRecord
body: <p>In my Extjs4 application I have a grid and a form.</p>
  
  <p>The user model: </p>
  
  <pre><code>Ext.define('TestApplication.model.User', {
      extend: 'Ext.data.Model',
      fields: [
        { name: 'id', type: 'int', useNull: true },
        { name: 'email', type: 'string'},
        { name: 'name', type: 'string'},
        { name: 'surname', type: 'string'}
      ],
      hasMany: { model: 'Agency', name: 'agencies' },
  });
  </code></pre>
  
  <p>And the Agency:</p>
  
  <pre><code>Ext.define('Magellano.model.Agency', {
    extend: 'Ext.data.Model',
    fields: [
      {name: 'id', type: 'int', useNull: true},
      {name: 'name', type: 'string'}
    ]
  });
  </code></pre>
  
  <p>Then in my form I'm creating the checkboxes: </p>
  
  <pre><code>[...]
    initComponent: function() {
      var store = Ext.getStore('Agencies');
      var checkbox_values = {xtype: 'checkboxfield', name: 'agencies[]'};
      var checkboxes = []
  
      store.each(function(record){
        var checkbox = {xtype: 'checkboxfield', name: 'agency_ids',
                        boxLabel: record.get('name'), inputValue: record.get('id')};
        checkbox.checked = true;
        checkboxes.push(checkbox)
      });
      this.items = [{
        title: 'User',
        xtype: 'fieldset',
        flex: 1,
        margin: '0 5 0 0',
        items: [{
          { xtype: 'textfield', name: 'email', fieldLabel: 'Email' },
          { xtype: 'textfield', name: 'name', fieldLabel: 'Nome' },
      }, {
        title: 'Agencies',
        xtype: 'fieldset',
        flex: 1,
        items: checkboxes
      }];
  [...]
  </code></pre>
  
  <p>Everything works well for sending form I am receiving all the data and can save it into database. </p>
  
  <p>When user clicks on the grid the record is loaded in the form with the standard:</p>
  
  <pre><code>form.loadRecord(record);
  </code></pre>
  
  <p>The problem is that the checkboxes are not checked. Are there any naming conventions for checkbox elements so Extjs can detect what to set? How can I setup the relations so the form will understand what to check? Or should I do everything by hand? </p>