View Full Version : get JSON Data from a Zend_Controller Action for ExtJS GridPanel

14 May 2010, 3:39 AM
Hello all,

I'm trying to build a ExtJS GridPanel that received the JSON data from a Zend_Controller Action.
The Action that i have looks like this:

public function listAction()
// establish database connection
$db = Zend_Registry::get('dbconnection');
// setup the SQL Query
$sql = "SELECT bug_id, bug_reported_on, bug_url, bug_priority, bug_status FROM bugs";
$result = $db->fetchAll($sql);
// encode data to the JSON format
$data = Zend_Json::encode($result);
echo $data;

My problem is now that the controller action doesn't show the data in the GridPanel but in its own .phtml view file above the gridpanel. Can someone help me with this problem?

Your help will be very appreciated!