           @setValue o.selectOptions[0].value unless o.defaultValue
 
   setDomElement:(cssClass = "")->
-    @inputName = @options.name
     name = "name='#{@options.name}'"
     @domElement = switch @getType()
       when "text"     then $ "<input #{name} type='text' class='kdinput text #{cssClass}'/>"

    @inputValidationNotifications = {}
    @valid = yes
    @inputCallback = null
    @setLabel()
    @setCallback()
    @setDefaultValue options.defaultValue

      @getDomElement().trigger "focus"
      @getDomElement().trigger "click"

  getLabel:-> @inputLabel

  setCallback:-> @inputCallback = @getOptions().callback
  getCallback:-> @inputCallback

  setType:(@inputType = "text")->
  getType:-> @inputType

  setName:(@inputName)->
  getName:-> @inputName

  setFocus:()->
    (@getSingleton "windowController").setKeyView @
