       success:  -> $('#' + field_id).val('')
       type: 'POST'
 
-  this.grid_state_to_request = (grid_state)->
+  grid_state_to_request : (grid_state)->
     jQuery.map(
       grid_state
       (pair) -> encodeURIComponent(pair[0]) + '=' + encodeURIComponent(pair[1])
     ).join('&')
 
 
-  this.append_to_url = (url, str)->
+  append_to_url : (url, str)->
 
     sep = if url.indexOf('?') != -1
       if /[&\?]$/.exec(url)

      '?'
    url + sep + str

  this.build_url_with_params = (dom_id_to_focus)->
    results = new Array()
    _this =  this
    jQuery.each(
      this.filter_declarations
      (i, filter_declaration)->
        param = _this.read_values_and_form_query_string(filter_declaration.filter_name, filter_declaration.detached, filter_declaration.templates, filter_declaration.ids)


          results.push(param)
    )

    res = @base_request_for_filter
    if  results.length != 0
      all_filter_params = results.join('&')
      res = @append_to_url(res, all_filter_params)

    if dom_id_to_focus
      res = @append_to_url(res, @parameter_name_for_focus + dom_id_to_focus)

    res



  reset : ->
    window.location = @base_request_for_filter


  export_to_csv : ->
    window.location = @link_for_export


  register : (func)->
    @filter_declarations.push(func)


  read_values_and_form_query_string : (filter_name, detached, templates, ids)->
    res = new Array()

    for i in [0 .. templates.length-1]
