Class Wice::WiceGrid
In: lib/wice_grid.rb
Parent: Object

Methods

External Aliases

count -> size

Attributes

ar_options  [R] 
csv_file_name  [R] 
csv_tempfile  [RW] 
custom_order  [R] 
export_to_csv_enabled  [R] 
klass  [R] 
name  [R] 
output_buffer  [RW] 
query_store_model  [R] 
renderer  [W] 
resultset  [R] 
saved_query  [R] 
status  [R] 
view_helper_finished  [RW] 

Public Instance methods

Returns the list of objects browsable through all pages with the current filters. Should only be called after the grid helper.

[Source]

     # File lib/wice_grid.rb, line 416
416:     def all_pages_records
417:       raise WiceGridException.new("all_pages_records can only be called only after the grid view helper") unless self.view_helper_finished
418:       resultset_without_paging_with_user_filters
419:     end

Returns the list of objects displayed on current page. Should only be called after the grid helper.

[Source]

     # File lib/wice_grid.rb, line 422
422:     def current_page_records
423:       raise WiceGridException.new("current_page_records can only be called only after the grid view helper") unless self.view_helper_finished
424:       @resultset
425:     end

A block executed from within the plugin to process records of the current page. The argument to the callback is the array of the records. See the README for more details.

[Source]

     # File lib/wice_grid.rb, line 139
139:     def with_paginated_resultset(&callback)
140:       @options[:with_paginated_resultset] = callback
141:     end

A block executed from within the plugin to process all records browsable through all pages with the current filters. The argument to the callback is a lambda object which returns the list of records when called. See the README for the explanation.

[Source]

     # File lib/wice_grid.rb, line 146
146:     def with_resultset(&callback)
147:       @options[:with_resultset] = callback
148:     end

[Validate]