# OneToMany-Assoziation Detail-Ansicht

**URL:** <https://forum.shopware.com/t/onetomany-assoziation-detail-ansicht/38397>\
**Category:** Programmierung\
**Created:** [20. Juli 2016 um 13:53 UTC](https://forum.shopware.com/t/onetomany-assoziation-detail-ansicht/38397 "2016-07-20T13:53:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tim\_netztronauten](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@tim\_netztronauten](https://forum.shopware.com/u/tim_netztronauten)\
**Post date:** [20. Juli 2016 um 13:53 UTC](https://forum.shopware.com/t/onetomany-assoziation-detail-ansicht/38397/1 "2016-07-20T13:53:01Z")

</div>

Hallo zusammen,

ich habe eine Frage zum Tutorial „Backend Components - Associations“.&nbsp;[Backend Components - Associations](https://developers.shopware.com/developers-guide/backend-components/associations/)

Und zwar zur Ext.JS Implementierung der OneToMany-Assoziation zwischen Produkten & Varianten. Da steht im Tutorial:

> The&nbsp;`Shopware.grid.Panel`&nbsp;component can then implement their own detail view in order to edit the variants.

Und genau bei diesem Punkt komme ich nicht weiter. Ich würde dann also im Panel noch das detailWindow konfigurieren:

```
    configure: function() {
        return {
            detailWindow: 'Shopware.apps.SwagProduct.view.detail.VariantDetails'
        };
    }

```

Ich weiß aber nicht wie ich die View selbst dann konfigurieren muss.&nbsp;

```
Ext.define('Shopware.apps.SwagProduct.view.detail.VariantDetails', {
    extend: 'Shopware.model.Container',
    padding: 20
    [?...?]
});

```

Kann mir da jemand weiterhelfen? Es tut sich nach wie vor nichts beim Klick auf Hinzufügen ;)&nbsp;

Vielen Dank und beste Grüße!

---

<div class="post-metadata">

**Author:** ![tim\_netztronauten](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@tim\_netztronauten](https://forum.shopware.com/u/tim_netztronauten)\
**Post date:** [21. Juli 2016 um 09:54 UTC](https://forum.shopware.com/t/onetomany-assoziation-detail-ansicht/38397/2 "2016-07-21T09:54:53Z")

</div>

Hat niemand eine Idee dazu?

---

<div class="post-metadata">

**Author:** ![jsdevelopment](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@jsdevelopment](https://forum.shopware.com/u/jsdevelopment)\
**Post date:** [28. August 2016 um 09:38 UTC](https://forum.shopware.com/t/onetomany-assoziation-detail-ansicht/38397/3 "2016-08-28T09:38:01Z")

</div>

Hallo Tim,

vielen Dank für deinen Hinweis oben, den hatte ich im Tutorial&nbsp;überlesen. Ich stand vor dem selben Problem. Das Detail Window muss von Shopware.window.Detail erben. Ich habe es bei mir in getrennten Ordner ausgelagert, aber es müßte auch im selben Ordner funktionieren. Übertragen auf deine Benennung:&nbsp;

```
Ext.define('Shopware.apps.SwagProduct.view.detail.VariantDetails', {
    extend: 'Shopware.window.Detail',
    alias: 'widget.tutorial-variant-detail-window',
    title : '{s name=title}Variant details{/s}',
    height: 420,
    width: 900
});

```

Beste Grüße!

---

<div class="post-metadata">

**Author:** ![mson](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@mson](https://forum.shopware.com/u/mson)\
**Post date:** [1. Dezember 2016 um 15:15 UTC](https://forum.shopware.com/t/onetomany-assoziation-detail-ansicht/38397/4 "2016-12-01T15:15:40Z")

</div>

Ich bekomme das Variant-Detail-Window angezeigt, beim Speichern erhalte ich jedoch einen “Cannot read property ‘indexOf’ of undefined” Fehler. Hat jemand eine Ahnung wieso?

---

<div class="post-metadata">

**Author:** ![DannyDan](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@DannyDan](https://forum.shopware.com/u/DannyDan)\
**Post date:** [19. April 2017 um 21:03 UTC](https://forum.shopware.com/t/onetomany-assoziation-detail-ansicht/38397/5 "2017-04-19T21:03:01Z")

</div>

Moin moin @mson‍ ,

konntest Du das Problem beim speichern und reloaden der liste beheben und hast evtl. einen Ansatz für mich?

Danny
