<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello Rajesh,<div class=""><br class=""></div><div class="">I usually have my own: MyApp::REST which extends&nbsp;</div><div class=""><pre style="font-variant-ligatures: normal; orphans: 2; widows: 2; word-wrap: break-word; white-space: pre-wrap;" class="">package MyApp::REST;
use Moose;
use Try::Tiny;
use DBIx::Class::ResultSet::RecursiveUpdate;
use Scalar::Util qw( reftype );

BEGIN { extends 'Catalyst::Controller::DBIC::API::REST' }

with 'Iris::Web::TraitFor::Controller::Datatables';</pre><div class=""><br class=""></div></div><div class="">….</div><div class=""><br class=""></div><div class="">and later on modifier:</div><div class=""><br class=""></div><div class=""><pre style="font-variant-ligatures: normal; orphans: 2; widows: 2; word-wrap: break-word; white-space: pre-wrap;" class="">=head2 list_format_output

Add more information about current search 

=cut

after 'list_format_output' =&gt; sub {
  my ($self, $c) = @_;

  if (!$self-&gt;has_errors($c) &amp;&amp; $c-&gt;req-&gt;has_search_total_entries) {
    my $current_result_set = $c-&gt;req-&gt;current_result_set;

    $c-&gt;stash-&gt;{ $self-&gt;stash_key }{last_page}            = $current_result_set-&gt;pager-&gt;last_page + 0;
    $c-&gt;stash-&gt;{ $self-&gt;stash_key }{current_page}         = $current_result_set-&gt;pager-&gt;current_page + 0;
    $c-&gt;stash-&gt;{ $self-&gt;stash_key }{entries_per_page}     = $current_result_set-&gt;pager-&gt;entries_per_page + 0;
    $c-&gt;stash-&gt;{ $self-&gt;stash_key }{entries_on_this_page} = $current_result_set-&gt;pager-&gt;entries_on_this_page + 0;
  }
};</pre><div class="">Best regards,</div></div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class=""><br class=""></div><div class="">On Mar 19, 2017, at 09:28, Rajesh Kumar Mallah &lt;<a href="mailto:mallah@redgrape.tech" class="">mallah@redgrape.tech</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi ,<br class=""><br class="">We know that Catalyst::Controller::DBIC::API supports paging<br class="">via list_count &nbsp;, list_page and list_offset &nbsp;options and<br class="">its possible to fetch a page of a large result set.<br class=""><br class="">However what it does not seems to support is to tell<br class="">the View(caller) of how many records in total exists , ie<br class="">the total_entries of the Data::Page object.<br class=""><br class="">This compels us to make two queries one to get the total count<br class="">and another to get the paged result.<br class=""><br class="">Does this feature really does not exists or am I missing something?<br class=""><br class="">(The reason I love and thoroughly use Catalyst::Controller::DBIC::API is <br class="">that it allows me to be lazy :p )<br class=""><br class="">regds<br class="">Rajesh Kumar Mallah.<br class=""><br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">List: <a href="mailto:Catalyst@lists.scsys.co.uk" class="">Catalyst@lists.scsys.co.uk</a><br class="">Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" class="">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br class="">Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" class="">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br class="">Dev site: <a href="http://dev.catalyst.perl.org/" class="">http://dev.catalyst.perl.org/</a><br class=""></div></div></blockquote></div><br class=""></div></body></html>