       height : @mget('height')
       width : @mget('width')
       offset : @mget('offset')
-      length : length
+      length : @model.length()
       filterselected : @mget('filterselected')
       maxlength : @mget('maxlength')
       counts : @mget('tabledata').data._counts


  go_back : () ->
    offset = @get('offset')
    offset = offset - @get('length')
    if offset < 0
      offset = 0
    @set('offset', offset)


  go_forward : () ->
    offset = @get('offset')
    offset = offset + @length()
    maxoffset = @get('maxlength') - @length()
    if offset > maxoffset
      offset = maxoffset
    @set('offset', offset)
    @save()

  go_end : () ->
    maxoffset = @get('maxlength') - @length()
    @set('offset', maxoffset)
    @save()

