rowe42 / lhm_animad_admin_html5

0 stars 6 forks source link

*New traversal aus den Formularen ausbauen #123

Closed xdoo closed 6 years ago

xdoo commented 6 years ago

Wenn ein neues Objekt angelegt wird, dann sucht die Anwendung nach einem *New Link. Das passt allerdings nicht zum Spring Data Rest Konzept. Ein 'new' ist einfach ein Post an den 'entityS' Link. Beispiel:

{
                "name": "San Francisco",
                "state": "CA",
                "country": "USA",
                "map": "37.77493, -122.419415",
                "_links": {
                    "self": {
                        "href": "http://localhost:8080/api/cities/20"
                    },
                    "city": {
                        "href": "http://localhost:8080/api/cities/20"
                    },
                    "citys": {
                        "href": "http://localhost:8080/api/cities"
                    }
                }
            }

Ein Post Request an den 'city' Link mit folgender Palyoad:

{
    "name": "Munich",
    "state": "BY",
    "country": "Germany",
    "map": "48.135125, 11.58198"
}

würde zu folgender Response führen:

{
    "name": "Munich",
    "state": "BY",
    "country": "Germany",
    "map": "48.135125, 11.58198",
    "_links": {
        "self": {
            "href": "http://localhost:8080/api/cities/23"
        },
        "city": {
            "href": "http://localhost:8080/api/cities/23"
        }
    }
}
ejcsid commented 6 years ago

Seit dem Merge tritt dieser Fehler in der enclosure view auf:

animad-relation-behavior.html:129 Uncaught (in promise) ReferenceError: halson is not defined at HTMLElement._loadRelationData (animad-relation-behavior.html:129) at Object.runObserverEffect [as fn] (property-effects.html:215) at runEffectsForProperty (property-effects.html:160) at runEffects (property-effects.html:126) at HTMLElement._propertiesChanged (property-effects.html:1674) at HTMLElement._flushProperties (property-accessors.html:564) at TemplateInstance.__enableOrFlushClients (property-effects.html:1573) at TemplateInstance._flushClients (property-effects.html:1548) at TemplateInstance._propertiesChanged (property-effects.html:1670) at TemplateInstance._flushProperties (property-accessors.html:564)

xdoo commented 6 years ago

Hast du bower install ausgeführt?

xdoo commented 6 years ago

Ich schließe das Ticket trotzdem mal. @ejcsid, Sollte das ein Fehler sein, bitte ein neues Issue erstellen.