Hey all,
I got an issue with creating a JSON view. So here is my setup
I have my catalyst app named scorer.
I have a controller named rules
I am using TT for views and everything is working fine
I wanted to add ajax so I added a method in my controller to get some
values for a drop down
I am using mochikit for the js scripting with the js file in my static
directory
I added a JSON view to my app but when I forward from my method I get
this error
* Couldn't render template "file error - rules/get_value_operators: not
found"
My method is simple it looks like this
sub get_value_operators : Local
{
my ($self, $c, $match_type_id) = @_;
$c->stash->{json} = $c->model('scorerDB::value_operator')->search
(
{
'match_type_id' => $match_type_id,
}
);
$c->forward('scorer::View::JSON');
}
My understanding may be wrong but the json view should create the
headers and return the result itself right? I shouldn't need to create a
template file on disk for a json view or so I assume. The only thing I
can think of is that for some reason it is still being sent to my TT
view.
Any advice or tips is appreciated.
Thanks,
------------------------------------------
Ali Mesdaq
Security Researcher II
Websense Security Labs
http://www.WebsenseSecurityLabs.com
------------------------------------------
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/