[OpenLayers-Users] wfs update
    Gabriel Nolasco 
    nolasco_gabriel at yahoo.com.br
       
    Thu Jul 16 09:26:08 EDT 2009
    
    
  
Hi!
I’m trying to update feature’s attributes on a WFS layer without successes.
This is my layer instantiation:
var myWFSLayer = new OpenLayers.Layer.WFS(
	"myWFSLayerName",
	"myWFSLayerServiceURL",
	{typename: 'topp:myWFSLayerTypename'},
	{
		typename: "myWFSLayerTypename",
		featureNS: "http://www.openplans.org/topp",
		extractAttributes: true
	}
);
My feature attributes:
var myAttributes = {
	"myField1": "myAttribute1",
        "myField2": "myAttribute2"
}
If I commit a new feature setting the state to “insert” the transaction succeeds and the feature is stored with its attributes:
myNewFeature.state = OpenLayers.State.INSERT;
myNewFeature.attributes = myAttributes;
myWFSLayer.commit();
However, if I set a previously existent feature state to "update" there are no changes in the database after the commit and the feature keeps its old attributes:
myOldFeature.state = OpenLayers.State.UPDATE;
myOldFeature.attributes = myAttributes;
myWFSLayer.commit();
I’m using postgreSQL 8.3 + GeoServer 1.7.5 + OpenLayers 2.8
Anyone has an idea about what I’m missing?
Thanks in advance,
Gabriel Nolasco
      ____________________________________________________________________________________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com
    
    
More information about the Users
mailing list