         context[model_name + '_url'] = model.url
         context[model_name + '_cid'] = model.cid
     else
+      if not @model
+        throw 'CompositeModelView : error : model is not set'
       context =
         model: @model.toJSON()
         cid: @model.cid
         url: @model.url
-      if not @model
-        throw 'CompositeModelView : error : model is not set'
 
     @_rendered = true
     template_result = render do @get_template, context

    e.preventDefault()
    @save

  keyup: (e) =>
    data = Backbone.Syphon.serialize(@)
    @model.set data

      'submit form': 'submitted'
      'keyup input': 'keyup'
      'keyup textarea': 'keyup'
      'change input[type=file]': 'file_chosen'
    if @extra_events
      form_events = _.extend(form_events, _.result(@, 'extra_events'))
    form_events
