     else
       @_model.createWithData(@data())
     @trigger 'saved', item
+    
+  @method 'submit', ->
+    ST.command @_command, @method('save')
+    @_dialog.close() if @_dialog
   
   @method 'cancel', ->
     @trigger 'cancelled'

        else
          ST.TextFieldView.create()
      field.id attribute
      field.searchRemotelyAt details.searchesRemotelyAt if details.searchesRemotelyAt
      @_fields[attribute] = field
      field.value(

  @method 'dialogButtons', (dialog, buttonbar) ->
    @_dialog = dialog
    self = this
    buttonbar.button '&nbsp;&nbsp;OK&nbsp;&nbsp;', @method('submit')
    buttonbar.button 'Cancel', @method('cancel')
    dialog.cancelFunction @method('cancel')