 
 
   set: (attr, value) ->
-    throw new Error("Attribute '#{attr}' not found for current model") if @attributes.indexOf(attr) == -1
+    throw new Error("Attribute '#{attr}' not found for #{@normal_name().toUpperCase()} model") if @attributes.indexOf(attr) == -1
 
     # TODO validate value
     @["_#{attr}"] = value
 
   get: (attr) ->
-    throw new Error("Attribute '#{attr}' not found for current model") if @attributes.indexOf(attr) == -1
+    throw new Error("Attribute '#{attr}' not found for #{@normal_name().toUpperCase()} model") if @attributes.indexOf(attr) == -1
 
     @["_#{attr}"]
 

        else
          self["_#{attr}"] = null

    if Object.keys(obj).length != 0
      for attr in Object.keys(obj)
        do(attr) ->

    m

  @from_html: () ->
    #FIXME
    form_name = @.form_name || @.name.replace(/([A-Z])/g, '_$1').replace(/^_/,"").toLowerCase()

    @.from_json(SiriusApplication.adapter.form_to_json("form[name='#{form_name}'"))

