I have published a WFS-T layer (using geoserver) and am able to add, edit and delete features using OpenLayers and it's Vector layer.
But, I don't know how can I populate additional attributes using OpenLayers and WFS-T. Any pointers?
Let's say I have database structure:
ARMY ( ID NUMBER PRIMARY KEY, NAME VARCHAR2(200)); INVADED_AREA ( ID NUMBER PRIMARY KEY, INVADED_BY_ARMY_ID NUMBER NOT NULL, AREA_GEOMETRY SDO_GEOMETRY, CONSTRAINT ia_fk FOREIGN KEY(INVADED_BY_ARMY_ID) REFERENCES ARMY(ID));
and I have a web application where you first select an army (with e.g. ID 42) and then start drawing geometries of invaded areas using OpenLayers. How do I get OpenLayers to put value 42 into INVADED_AREA.INVADED_BY_ARMY_ID column?
EDIT: I have found http://dev4.mapgears.com/bdga/bdgaWFS-T.html# which seems to do what I am looking for. Will update when I have investigated it more.
Also found bunch of related gis.stackexchange questions. I will look through them more carefully, at first glance none had an easy answer:
- I want to edit corresponding postgresql data of a vector from openlayers- how to do it?
- How to edit Attributes on WFS Layer through Popup?
- How to edit feature attributes with openlayers?
- Modify WFS with OpenLayers
- adding non spatial attributes using geoserver
- How to insert non-spatial data through WFS-T insert?
And from openlayers-dev: http://lists.osgeo.org/pipermail/openlayers-dev/2007-April/000520.html