     @item = App[ @genericObject ].find( @id )
     @head = @pageData.object
 
-    controller = new App.ControllerForm(
+    @controller = new App.ControllerForm(
       model:      App[ @genericObject ]
       params:     @item
       screen:     @screen || 'edit'
       autofocus:  true
     )
-    controller.form
+    @controller.form
 
   onSubmit: (e) ->
     params = @formParam(e.target)


  content: =>
    @head = @pageData.object
    controller = new App.ControllerForm(
      model:     App[ @genericObject ]
      params:    @item
      screen:    @screen || 'edit'
      autofocus: true
    )
    controller.form

  onSubmit: (e) ->
    params = @formParam(e.target)

          ui.callback(item)
        ui.close()

      fail: (settings, details) ->
        ui.log 'errors', details
        ui.formEnable(e)
        ui.controller.showAlert(details.error_human || details.error || 'Unable to create object!')
    )

class App.ControllerGenericEdit extends App.ControllerModal
