# \[Gelöst\] ext.js backend -&gt; CategorySelection

**URL:** https://forum.shopware.com/t/gelost-ext-js-backend-gt-categoryselection/28747
**Category:** Shopware 3.5
**Tags:** programming
**Created:** [8. Juli 2015 um 15:00 UTC](https://forum.shopware.com/t/gelost-ext-js-backend-gt-categoryselection/28747 "2015-07-08T15:00:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![steinsoftware](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@steinsoftware](https://forum.shopware.com/u/steinsoftware)
#### Post date: [8. Juli 2015 um 15:00 UTC](https://forum.shopware.com/t/gelost-ext-js-backend-gt-categoryselection/28747/1 "2015-07-08T15:00:11Z")

</div>

Hallo Forum, Jetzt habe ich mal eine Frage zu Ext.Js. Ich bin da noch ziemlich am Anfang. Grob habe ich mich am Favoriten-Plug-In-Beispiel ([http://community.shopware.com/Fortgesch … 4\_871.html](http://community.shopware.com/Fortgeschrittene-Favoritenliste%5C_detail%5C_1054%5C_871.html)) von Shopware orientiert. Funktioniert soweit auch alles ganz gut. Nur will ich nicht Artikel laden, sondern Kategorien. In [PluginName]/Views/backend/[plugin\_name]/view/list/articles.js (heißt bei mir natürlich auch dementsprechend categories.js) aus dem Favoriten-Beispiel habe ich deshalb statt der Funktion createArticleSearch die Funktion `createCategorySelection: function() { var me = this; me.categorySelection = Ext.create('Shopware.apps.SteinsoftwareDiscount.view.fields.CategorySelection', { name: 'number', fieldLabel: '{s name=articles/add\_article\_field}Add product{/s}', returnValue: 'name', labelWidth: 150, hiddenReturnValue: 'number', width: 400, valueField: 'id', categoryStore: Ext.create('Shopware.apps.Base.store.Category'), listeners: { //we have to enable the add buton after the user select an category record. //valueselect: function(field, name, number, record) { select: function(field, name, number, record) { //me.fireEvent('addCategory', me, record); me.fireEvent('addCategory', this.valueField, record); } } }); return me.categorySelection; },` und unter [PluginName]/Views/backend/[plugin\_name]/view/fields habe ich dann eben eine Kopie von /templates/\_default/backend/emotion/view/components/fields/category\_selection.js - leicht(!
