 
   content: =>
     @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)

          ui.callback(item)
        ui.close()

      fail: ->
        ui.log 'errors'
        ui.close()
    )

class App.ControllerGenericEdit extends App.ControllerModal

    @item = App[ @genericObject ].find( @id )
    @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)
