This is a little fishy–

my ($users) = $c->model('DB::Tech')->search_rs; # No parens necessary or desired, it returns just a ResultSet. my $users = $c->model('DB::Tech')->search_rs;

–but it won’t cause a problem either way.

Debugging / general pointers–

New controller method (PathPart is fine to be explicit but it is redundant here because it’s the same as the method name; and the template setting might even be superfluous)–

sub list :Chained('base') :Args(0) { my ( $self, $c ) = @_; $c->stash(template => 'admin/list.tt2'); } # OR this is likely to work if your TT stuff is configured right- sub list :Chained('base') :Args(0) {}

Now the template. Compare the var names in the loop below to your version. users_rs is already in the stash from chaining off of admin/base. You might want to stop referring to them as techs. It does seem to cause some problems. :)

[% META title = 'System Users List' -%] <table> <tr><th>ID</th><th>firstname</th><th>lastname</th><th>email</th><th>ph +one</th><th>Management Rating</th><th>Comments</th><th>Date</th><th>A +dmin</th></tr> [% FOR user IN users_rs.all -%] <tr> <td>[% user.id %]</td> <td>[% user.firstname | html %]</td> <td>[% user.lastname | html %]</td> <td>[% user.phone | html %]</td> <td>[% user.email | html %]</td> <td>[% user.phone | html %]</td> <td>[% user.managementrating | html %]</td> <td>[% user.managementcomments | html %]</td> <td>[% user.date %]</td> <td>[% user.ismanagement %]</td> </tr> [% END -%] </table>

In reply to Re: Can't retrieve data in a catalyst controller by Your Mother
in thread Can't retrieve data in a catalyst controller by vendion

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.