[Catalyst] Database contents not displayed after hitting page refresh

cranky sharath.g at hcl.in
Wed Sep 3 05:48:08 BST 2008


Hi, I'm a newbie to catalyst. I have built a small app, similar to the one in
catalyst manual (basic CRUD). I have a page wherein a <table> displays its
contents after getting it from the database (SQLite3), the problem is, it
doesn't display the contents after I refresh the page.

I'm using TT2 for html, here it is:
 
------------------------------------------------------
<table>
[% WHILE (item = data.next) %]
	<tr>	
		<td> [% item.function | html %] </td>
		<td> [% item.testdate | html %] </td>
		<td> [% item.tester | html %] </td>
		<td> [% item.qalead | html %]</td>
		<td> [% item.nopassed | html %] </td>
</table>
-------------------------------------------------------

and the perl code looks like this:

-------------------------------------------------------
sub ShowData : Local {
	my ($self, $c) = @_;
	my $data = $c->model('Ttrack::Ttrack');       
	$c->stash->{data} = $data;	
	$c->stash->{template} = 'ShowData.tt2';
}
-------------------------------------------------------

I generated the modules required under 'Model' by this command: 

C:\formdata\> perl script\formdata_create.pl model Ttrack DBIC::Schema
formdata::Schema::Ttrack create=static dbi:SQLite:database

Where am I doing wrong?

-- 
View this message in context: http://www.nabble.com/Database-contents-not-displayed-after-hitting-page-refresh-tp19282861p19282861.html
Sent from the Catalyst Web Framework mailing list archive at Nabble.com.




More information about the Catalyst mailing list