# List controller cant be loaded

**URL:** <https://forum.shopware.com/t/list-controller-cant-be-loaded/46799>\
**Category:** International (English Only)\
**Tags:** programming\
**Created:** [10. Juli 2017 um 07:32 UTC](https://forum.shopware.com/t/list-controller-cant-be-loaded/46799 "2017-07-10T07:32:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![irfanh94](https://avatars.discourse-cdn.com/v4/letter/i/8dc957/32.png) [@irfanh94](https://forum.shopware.com/u/irfanh94)\
**Post date:** [10. Juli 2017 um 07:32 UTC](https://forum.shopware.com/t/list-controller-cant-be-loaded/46799/1 "2017-07-10T07:32:41Z")

</div>

Hi guys…

I have an list/markets.js file which is extending Shopware.grid.Panel and in the „configure“ function I have set returning parameter hasOwnController to true, and named the controller in the „controller“ parameter.

Now, I have controller/listmarkets.js which is extending Ext.app.Controller, and the problem is that, file is always loaded, but the launch function is not fired so the rest of the class is not loaded too.

I have tried everything but I couldnt find an error to fix. ☹

Here are the screenshots:

- **list/markets.js**  
[https://image.ibb.co/gQRLHv/Screen\_Shot\_2017\_07\_10\_at\_09\_28\_26.png](https://image.ibb.co/gQRLHv/Screen_Shot_2017_07_10_at_09_28_26.png)  
&nbsp;
- **controller/listmarkets.js**  
[https://image.ibb.co/ne6nxv/Screen\_Shot\_2017\_07\_10\_at\_09\_28\_43.png](https://image.ibb.co/ne6nxv/Screen_Shot_2017_07_10_at_09_28_43.png)

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [10. Juli 2017 um 13:48 UTC](https://forum.shopware.com/t/list-controller-cant-be-loaded/46799/2 "2017-07-10T13:48:33Z")

</div>

Hi,

the Shopware.grid.Panel has no possibilities to set a „controller“ here. If you set the property hasOwnController to true, you only need to implement a new controller, which is listining to the events of the Shopware.grid.Panel. If you want to use custom events, you don’t even have to set this value to true. You can find more information about that in the code documentation:&nbsp;Shopware.grid.Panel.displayConfig.hasOwnController&nbsp;  
[shopware/Shopware.grid.Panel.js at 5.2 · shopware/shopware · GitHub](https://github.com/shopware/shopware/blob/5.2/themes/Backend/ExtJs/backend/base/application/Shopware.grid.Panel.js#L276)&nbsp;

Viele Grüße aus Schöppingen

![cool](http://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/shopware.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![irfanh94](https://avatars.discourse-cdn.com/v4/letter/i/8dc957/32.png) [@irfanh94](https://forum.shopware.com/u/irfanh94)\
**Post date:** [11. Juli 2017 um 07:22 UTC](https://forum.shopware.com/t/list-controller-cant-be-loaded/46799/3 "2017-07-11T07:22:16Z")

</div>

Hi [@Michael Telgmann]([http://forum.shopware.com/profile/17553/Michael](http://forum.shopware.com/profile/17553/Michael) Telgmann „Michael Telgmann“)‍

So, you are saying that I can directly write functions in list/markets.js which are listening the controller?  
Also, if I set hasOwnController to false, extjs error came up „Uncaught TypeError: Cannot read property ‚control‘ of undefined“.
