This was a test to make sure I was actually getting data. My intention is 
to return all rows in pager format. I haven't made it to that part yet. 
Here is my template code:

<table width="100%" border="1">
    <tr><th>Department</th><th>Account Code</th><th>Account 
Name</th><th>Policy</th><th>Compliant</th><th>Servers</th><th>Subsystems</th><th>Complete</th><th>Status</th></tr>
    [% # Display each account in a table row %]
    [% FOREACH account IN accounts -%]
      <tr>
                <td>1[% accounts.department_id %]</td>
                <td>2[% accounts.account_code %]</td>
        <td>3[% accounts.account_name %]</td>
                <td>4[% accounts.account_policy %]</td>
        <td>5[% accounts.percent_compliant %]</td>
        <td>6[% accounts.num_servers %]</td>
        <td>7[% accounts.num_subsystems %]</td>
        <td>8[% accounts.percent_complete %]</td>
        <td>9[% accounts.account_status %]</td>
      </tr>
    [% END -%]
    </table>



From:
Jorge Gonzalez <[email protected]>
To:
[email protected]
Date:
04/27/2012 09:44 AM
Subject:
Re: [Catalyst] No data showing



Can we see your template? How are you accesing your data there?

Just a matter of style, but if "accounts" is going to hold a list of just 
one element, why not name it "account" (singular) and stick the row 
directly in it, instead of a list? That way, in your template you can 
access it just by [% account %] (if usint TT), instead of having to 
traverse the list (with for, next, etc.) or index the first element...

Regards
J.

El 27/04/12 16:07, Kenneth S Mclane escribió: 
OK, I still can't get "->all" to work, but this: 

$c->stash(accounts => [ 
$c->model('ORANGES::AccountView')->find({account_name => 'GHODB2'}) ]); 

returns one row, as it should, but there is no data showing in my page. 
Obviously the query is successful, so the data must exist or it could not 
match, but I am at a loss to know where my data is and why it isn't 
showing in my page. 

any ideas?

Regards 


Kenneth McLane 
 700 Locust St 

Systems Compliance Services 
 Dubuque, 52001-6838 
I1OB 
 USA 
GTS Services Delivery 
  

Phone: 
+1-563-845-4674 
  

Tie-Line: 
946-4674 
  

Mobile: 
+1-563-940-7147 
  

e-mail: 
[email protected] 
  

"Ideas come from everything" -- Alfred Hitchcock 
  
 



_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: 
http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: 
http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/


<<image/gif>>

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to