[Catalyst] Issue with JSON view

Mesdaq, Ali amesdaq at websense.com
Thu Aug 9 01:51:03 GMT 2007

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
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

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,

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

Any advice or tips is appreciated.

Ali Mesdaq
Security Researcher II
Websense Security Labs

More information about the Catalyst mailing list