     mixins: [
         Lanes.Components.Form.FieldMixin
     ]
+    modelForAccess: ->
+        if @props.parentModel
+            @props.parentModel[@props.associationName]
+        else
+            @props.model
 
     showFinder: ->
         @context.viewport.displayModal(

    renderEdit: ->
        findIcon = <button className="btn btn-primary icon icon-search icon-lg"
            onClick={@showFinder}/>
        <LC.Input
            ref="input"
            {...@props}

            editOnly writable
            name={@props.query.initialField.id}
            onKeyPress={@onKeyPress}
            model={@modelForAccess()}
            buttonAfter={findIcon} />
