I have created custom module in magento. Its working good. But now my problem is, I want to add product grid to my product list tab.I have found the solution through this link.I have created new tab.But when i load that tab, its shows me an error like

Fatal error: Call to a member function setProdlist() on a non-object in /home/trendyc/public_html/app/code/community/Whole/Cate/controllers/Adminhtml/WhcatalogController.php on line 64

Mycontroller file's productsAction code here

            ->setProdlist($this->getRequest()->getPost('products_prodlist', null));

I think, i need to do some modification on layout file. But i can't get what modifications need to do there in layout .xml file.I hope you understand my problem. Please help me guys!


The error message indicates that the function is called on a non-object. Looking at your code, the object which seems to be a "non-object" is $this->getLayout()->getBlock('products.grid'). This indicates that your block is not declared correctly in the layout. You should have a layout update for adminhtml where you have something like

    <reference name="content">
       <block name="products.grid" type="YOUR/GRIDTYPE" />
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.