Ext.define('SenchaFront.controller.ProfileListController', {
    extend: 'Ext.app.Controller',
    
    config: {
        refs: {
            addProfileButton: '#addProfileButton'
        },
        control: {
            addProfileButton: {
                tap: 'addProfile'
            }
        }
    },
    
    //called when the Application is launched, remove if not needed
    launch: function(app) {
        
    },

    getStore: function() {
        return Ext.StoreMgr.get('profiles');
    },

    addProfile: function() {
        var newRecord = Ext.create('SenchaFront.model.Profile', {
            name: 'New Profile'
        });
        var store = this.getStore();
        store.add(newRecord);
        store.sync();
        // this.editProfile(newRecord);
    }
});

@@ -87,16 +87,79 @@
 roller',
+%0A%0A    requires: %5B%0A        'SenchaFront.form.ProfileForm'%0A    %5D,
 %0A    %0A  
@@ -235,16 +235,104 @@
 eButton'
+,%0A            profileList: '#profileList',%0A            navigationView: '#navigationView'
 %0A       
@@ -412,32 +412,192 @@
 p: 'addProfile'%0A
+            %7D,%0A            profileList: %7B%0A                itemtap: 'listItemTapped'%0A            %7D,%0A            navigationView: %7B%0A                back: 'goBack'%0A
             %7D%0A  
@@ -712,24 +712,16 @@
 (app) %7B%0A
-        
 %0A    %7D,%0A
@@ -1036,19 +1036,16 @@
 %0A       
- //
  this.ed
@@ -1062,22 +1062,497 @@
 newRecord);%0A
+    %7D,%0A%0A    listItemTapped: function(view, index, element, record) %7B%0A        this.editProfile(record);%0A    %7D,%0A%0A    editProfile: function(record) %7B%0A        var navView = this.getNavigationView();%0A        // Make the profile edit form%0A        var form = Ext.create('SenchaFront.form.ProfileForm');%0A        form.setRecord(record);%0A        navView.push(form);%0A        this.getAddProfileButton().hide();%0A    %7D,%0A%0A    goBack: function() %7B%0A        this.getAddProfileButton().show();%0A
     %7D%0A%7D);%0A

Allow editing of profiles