view app/model/Kommentar.js @ 78:a8619efdf3ae

Removed ID field from create form as providing a value here seems to trigger a PUT instead of a POST request. The ID will be generated on serverside.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 11 Jun 2013 08:57:44 +0200
parents 2d6c4f4c9b11
children 8356595f4fdb
line wrap: on
line source
Ext.define('Lada.model.Kommentar', {
    extend: 'Ext.data.Model',
    fields: [
        {name: "id"},
        {name: "kid"},
        {name: "probeId"},
        {name: "erzeuger"},
        {name: "kdatum"},
        {name: "ktext"}
    ],
    // TODO: This id field is currently a combined field of probeId and kid
    // which cases problems when generating a request with this id to the
    // server.
    idProperty: "id",
    proxy: {
        type: 'rest',
        appendId: true, //default
        url: 'server/rest/kommentare',
        reader: {
            type: 'json'
        }
    }
});

http://lada.wald.intevation.org