title: Explain ExtJs loadRecord method
body: <p>I've got two forms(grid and form with fields).</p>
  
  <p>My question step by step:</p>
  
  <ul>
  <li>When I select grid row all date from row loads to Edit form, where i have currentDateField by loadRecord method in controller.</li>
  <li>In Edit form I have field with id 'currentDateField' with default value (new Date())</li>
  <li>When loadRecord method invoked this filed changes its value, but i want to make this field be always in default value of (new Date())</li>
  </ul>
  
  <p>So my questions are:</p>
  
  <ol>
  <li>How does loadRecord works and how it changes fields values in Edit form?</li>
  <li>How can i make 'currentDateField' always be in default value even if loadRecord method ivoked?</li>
  </ol>
  
  <p>First: </p>
  
  <pre><code>Ext.define('MVC.view.NotesGrid', {
  extend: 'Ext.grid.Panel',
  xtype: 'notes',
  
  title: 'Note-list',
  
  store: 'Notes',
  
  columns: [
      {
          text: 'Name',
          dataIndex: 'name',
          flex: 1
      },
      {
          text: 'Creation Date',
          xtype: 'datecolumn',
          format: 'd-m-Y',
          dataIndex: 'createDate',
          flex: 1
      },{
          text: 'Last Modified',
          xtype: 'datecolumn',
          format: 'd-m-Y',
          dataIndex: 'modifiedDate',
          flex:1
      }, {
          text: 'Text',
          dataIndex: 'noteText',
          flex: 3
      }
  ]
  });
  </code></pre>
  
  <p>Second:</p>
  
  <pre><code>Ext.define('MVC.view.Edit', {
  extend: 'Ext.form.Panel',
  xtype: 'edit',
  
  title: 'Note',
  frame: true,
  padding: 10,
  items: [
      {
          xtype: 'textfield',
          name: 'name',
          fieldLabel: 'Name',
          emptyText: 'New note'
      },
      {
          xtype: 'datefield',
          name: 'createDate',
          fieldLabel: 'Creation date',
          emptyText: 'Will be current date',
          format: 'd-m-Y',
          readOnly: true
      },
      {
          xtype: 'datefield',
          name: 'modifiedDate',
          fieldLabel: 'Current date',
          readOnly: true,
          itemID: 'currentDateField',
          format: 'd-m-Y',
          value: new Date()
      }, {
          xtype: 'textarea',
          name: 'noteText',
          height: 150,
          fieldLabel: 'Note text',
          width: '100%'
      },
      {
          xtype: 'button',
          text: 'Delete',
          itemId: 'DeleteButton',
          margin: '0 10 0 0'
      },
      {
          xtype: 'button',
          text: 'Clear',
          margin: '0 10 0 0',
          itemId: 'ClearButton',
          handler: function () {
              this.up('edit').getForm().reset();
          }
      },
      {
          xtype: 'button',
          text: 'Save',
          itemId: 'SaveRecord'
      }
  ]
  
  });
  </code></pre>
  
  <p>GridController:</p>
  
  <pre><code>Ext.define('MVC.controller.Notes', {
  extend : 'Ext.app.Controller',
  
  init: function() {
       this.control({
           'notes': {
               select : this.onGridSelect
           }
       });
   },
  
  onGridSelect : function(grid, record, index, eOpts) {
      // grab a reference to the Detail view... 
      // we could have used a controller "ref", but those can also be problematic
      var detailView = Ext.ComponentQuery.query('edit')[0];
  
      //set the form record manually
      detailView.loadRecord(record);
  }
  });
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>Ext.define('MVC.model.Note', {
  extend : 'Ext.data.Model',
  
  fields : [
      {
          name : 'name',
          type : 'string'
      },
      {
          name : 'createDate',
          type : 'date'
      },
      {
          name : 'modifiedDate',
          type : 'date'
      },
      {
          name : 'noteText',
          type : 'string'
      }
  ]
  });
  </code></pre>
  
  <p>Store:</p>
  
  <pre><code>Ext.define('MVC.store.Notes', {
  extend  : 'Ext.data.Store',
  
  requires : [
      'MVC.model.Note'
  ],
  
  storeId : 'Notes',
  model   : 'MVC.model.Note',
  
  data : [
      { 
          'name'  : 'Lisa',  
          'createDate' : '10-23-1234',
          'modifiedDate' : '04-21-2016',
          'noteText' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam posuere odio leo, at mollis libero porta ut. Etiam mauris ipsum, iaculis a imperdiet sit amet, bibendum id urna. Proin tempus lectus nisl, a tristique est tempor quis. Etiam interdum urna dolor, non gravida nulla laoreet a. Donec id velit metus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur eu purus sed nisl commodo malesuada et ut velit. Quisque ut lorem magna. Nulla eget odio est. Sed ultrices turpis quam. Aliquam quis sollicitudin dolor.'
      },
      { 
          'name'  : 'Bart',  
          'createDate' : '10-24-1234',
          'modifiedDate' : '04-3-2016',
          'noteText' : 't, bibendum id urna. Proin tempus lectus nisl, non gicitudin dolor.'
      },
      { 
          'name'  : 'Homer', 
          'createDate' : '10-25-1234',
          'modifiedDate' : '12-13-2416',
          'noteText' : 'qwerty'
      },
      { 
          'name'  : 'Marge', 
          'createDate' : '10-26-1234',
          'modifiedDate' : '04-21-2016',
          'noteText' : 'qwerty123123'
      }
  ]
  });
  </code></pre>