                   $(ele).find("input").hide()
                 catch ex
               )
-    )   
+    )
 
   bindLabels: (data, container) ->
     labels = $(container).find("label[data-val]")
     jQuery.each(labels, (i, ele) ->
             jQuery.each(data, (i, obj) ->
-              if $(ele).attr("data-val") 
+              if $(ele).attr("data-val")
                 property = $(ele).attr("data-val").split(".")
                 try
                   data_options = ""

          when "even" then evenOdd = "odd"
          else evenOdd = "odd"
        row = "<tr class='" + evenOdd + "'>"
        
        headers = $(ele).find("th")
        jQuery.each(headers, (k, eles) ->
           data_options = []
           try
              try
                data_options = ($(eles).attr("data-options").split(" "))
              catch ex
                values = eles
              try
                property = $(eles).attr("data-val").split(".")
              catch ex
              unless property?
                return null
              nested = obj
              for i in [0..property.length - 1]
                  nested = nested[property[i]]
              isNull = nested?
              
              nested = "" unless isNull
              undefinedCount++ unless isNull
              if $(eles).attr("data-val")
                  input_name = Prometheus.getInputName(eles, property)
                  input_id =  Prometheus.getInputId(eles, property, row_count)
                  input_name = "#{input_name}[#{row_count}]"
                  input_type = Prometheus.getInputType(eles)
                  change = Prometheus.getOnChange(eles)
                  classes = Prometheus.setColumnClasses(data_options)
                  cls = Prometheus.getClasses(eles)
                  row += "<td class='#{cls} #{classes}'>"
                  row += "<label>#{nested}</label>"
                  if input_type == "select"
                    row += Prometheus.addTableSelect(input_name, row_count, val, eles, property, data, nested, change, blur)
                  else
                    row += Prometheus.addTableInput(input_name, input_id, nested, property, change, blur)
              if $(eles).attr("data-href")
                  row += Prometheus.addTableLink(eles)
           catch ex
                row += Prometheus.addEmptyColumn
                undefinedCount++
       
          )
        row += "</tr>"
        if undefinedCount < headers.length
          row_count++
          if not success
            if not appendData
              $(ele).find("tbody").html("")
              success = 1
          $(ele).find("tbody").append(row)
          $(ele).find("input").hide()
          $(ele).find("select").hide()
      )
    )
    Prometheus.bindEditables()
   

  getOnChange: (eles) ->
    change = "" 
    try
      if $(eles).attr("data-change")
        change = $(eles).attr("data-change")

  getInputType: (eles) ->
    input_type = undefined
    try
      if $(eles).attr("data-input")
          input_type = $(eles).attr("data-input").toString()
    catch ex
      input_type = "text"
    return input_type

  getInputName: (eles, property) ->
    if $(eles).attr("data-name")
        input_name = $(eles).attr("data-name")
    else if property.length > 1
        input_name = property.join("_")
    else
        input_name = property.toString()

  getInputId: (eles, property, row_count) ->
    if $(eles).attr("data-id")
        input_id = $(eles).attr("data-id")
    else
        input_id = property.join("_")
        input_id = "#{input_id}_#{row_count}"

  getId: (eles) ->
    ele_id = ""
    if $(eles).attr("data-id")
      ele_id = $(eles).attr("data-id")
    return ele_id

  getClasses: (eles) ->
    if $(eles).attr("data-class")
      cls = $(eles).attr("data-class")
    else
      cls = ""
    return cls

  addTableLink: (eles) ->
    row = "<td>"
    row += "<a href='#{$(eles).attr('data-href')}' onclick='#{$(eles).attr('data-click')}'><span class='#{$(eles).attr('data-class')}'> </span></a>"
    row += "</td>"
    return row

  addTableInput: (name, id, nested, property, change, blur) ->
    unless nested?
      return null
    row  = "<input name='#{name}' id='#{id}' value='#{nested}' onblur='#{blur}' class='hidden #{property.join("_")} editable' onchange=\"#{change}\"/>"
    row += "</td>"
    return row

  addEmptyColumn: ->
    row = "<td></td>"
    return row

  addTableSelect: (input_name, row_count, val, eles, property, data, nested,change, blur) ->
    row = ""
    select_options = data
