     constructor: (options={})->
         super
         @access ||= this.calculate_access()
-
-    namespace: "Components"
 
     session:
         access:

        else
            'none'


Lanes.Components.Base = Lanes.Views.Base.extend(BaseComponent)

        readOnly:  { deps: ['access'], fn:-> @access=='read' }
        writeAble: { deps: ['access'], fn:-> @access=='write' }

    emptyTemplateName: -> this.writeTemplate()
    readTemplateName:  -> this.writeTemplate()
    writeTemplateName: -> 'lanes/views/empty-span'

    renderContextFree: ->
        tmpl = if this.writeAble
            'writeTemplate'
        else if this.readOnly
            'readTemplate'
        else
            'emptyTemplate'

        this.replaceEl( this.renderTemplateMethod(tmpl) );

    templatePrefix: -> this.FILE.extensionName.toLowerCase() + "/components/"

    calculate_access:->
        if ! @field_name || Lanes.Views.RenderContext.canWrite(@field_name)
