[Geoserver-users] WFS-t insert alphanumeric values

Hi!
After drwing my feature trought openlayers and wfs-t protocol in geoserver, I'd like to update alphanumeric fileds of that feature reading some variables in query string.
Something like this:

// Javascript function
function getQueryVariable(variable) {
        var query = window.location.search.substring(1);
        var vars = query.split("&");
         for (var i=0;i<vars.length;i++) {
         var pair = vars[i].split("=");
         if (pair[0] == variable) {
         return pair[1];
     }
   }
  alert('Query Variable ' + variable + ' not found');
   }

// wfs-t update request: "importo" and "nome" will be my query_string variables....

<wfs:Transaction service="WFS" version="1.0.0"
  xmlns:topp="http://www.openplans.org/topp&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:wfs="http://www.opengis.net/wfs&quot;&gt;
  <wfs:Update typeName="topp:poligono">
    <wfs:Property>
      <wfs:Name>nome</wfs:Name>
      <wfs:Value>"my query_string variable value"</wfs:Value>
         </wfs:Property>
    <wfs:Property>
      <wfs:Name>importo</wfs:Name>
      <wfs:Value>"my query_string variable value"</wfs:Value>
         </wfs:Property>
    <ogc:Filter>
      <ogc:FeatureId fid="poligono.1"/>
    </ogc:Filter>
  </wfs:Update>
</wfs:Transaction>

Is it just possible with openlayers or must I have to modify something in JS code?

Thanks

--
Ing. Fabio D'Ovidio

INOVA Open Solutions s.r.l.
Web : http://www.inovaos.it
Tel.: 081 197 57 600
mail: fabiodovidio@anonymised.com

Fabio,

see my other post for the OpenLayers part of what you need.

For the Geoserver part, you need a FeatureType (Layer) with "nome" and
"importo" fields. I assume you have that already.

Regards,
Andreas.

On Mon, Jun 30, 2008 at 4:38 PM, Fabio D'Ovidio <fabiodovidio@anonymised.com> wrote:

Hi!
After drwing my feature trought openlayers and wfs-t protocol in
geoserver, I'd like to update alphanumeric fileds of that feature
reading some variables in query string.
Something like this:

// Javascript function
function getQueryVariable(variable) {
       var query = window.location.search.substring(1);
       var vars = query.split("&");
        for (var i=0;i<vars.length;i++) {
        var pair = vars[i].split("=");
        if (pair[0] == variable) {
        return pair[1];
    }
  }
alert('Query Variable ' + variable + ' not found');
  }

// wfs-t update request: "importo" and "nome" will be my query_string
variables....

<wfs:Transaction service="WFS" version="1.0.0"
xmlns:topp="http://www.openplans.org/topp&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:wfs="http://www.opengis.net/wfs&quot;&gt;
<wfs:Update typeName="topp:poligono">
   <wfs:Property>
     <wfs:Name>nome</wfs:Name>
     <wfs:Value>"my query_string variable value"</wfs:Value>

   </wfs:Property>
   <wfs:Property>
     <wfs:Name>importo</wfs:Name>
     <wfs:Value>"my query_string variable value"</wfs:Value>

   </wfs:Property>
   <ogc:Filter>
     <ogc:FeatureId fid="poligono.1"/>
   </ogc:Filter>
</wfs:Update>
</wfs:Transaction>

Is it just possible with openlayers or must I have to modify something
in JS code?

Thanks

--
Ing. Fabio D'Ovidio

INOVA Open Solutions s.r.l.
Web : http://www.inovaos.it
Tel.: 081 197 57 600
mail: fabiodovidio@anonymised.com

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Yes,
Thanks you!! it works :wink:

Andreas Hocevar ha scritto:

Fabio,

see my other post for the OpenLayers part of what you need.

For the Geoserver part, you need a FeatureType (Layer) with "nome" and
"importo" fields. I assume you have that already.

Regards,
Andreas.

On Mon, Jun 30, 2008 at 4:38 PM, Fabio D'Ovidio <fabiodovidio@anonymised.com> wrote:
  

Hi!
After drwing my feature trought openlayers and wfs-t protocol in
geoserver, I'd like to update alphanumeric fileds of that feature
reading some variables in query string.
Something like this:

// Javascript function
function getQueryVariable(variable) {
       var query = window.location.search.substring(1);
       var vars = query.split("&");
        for (var i=0;i<vars.length;i++) {
        var pair = vars[i].split("=");
        if (pair[0] == variable) {
        return pair[1];
    }
  }
alert('Query Variable ' + variable + ' not found');
  }

// wfs-t update request: "importo" and "nome" will be my query_string
variables....

<wfs:Transaction service="WFS" version="1.0.0"
xmlns:topp="http://www.openplans.org/topp&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:wfs="http://www.opengis.net/wfs&quot;&gt;
<wfs:Update typeName="topp:poligono">
   <wfs:Property>
     <wfs:Name>nome</wfs:Name>
     <wfs:Value>"my query_string variable value"</wfs:Value>

   </wfs:Property>
   <wfs:Property>
     <wfs:Name>importo</wfs:Name>
     <wfs:Value>"my query_string variable value"</wfs:Value>

   </wfs:Property>
   <ogc:Filter>
     <ogc:FeatureId fid="poligono.1"/>
   </ogc:Filter>
</wfs:Update>
</wfs:Transaction>

Is it just possible with openlayers or must I have to modify something
in JS code?

Thanks

--
Ing. Fabio D'Ovidio

INOVA Open Solutions s.r.l.
Web : http://www.inovaos.it
Tel.: 081 197 57 600
mail: fabiodovidio@anonymised.com

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ing. Fabio D'Ovidio

INOVA Open Solutions s.r.l.
Web : http://www.inovaos.it
Tel.: 081 197 57 600
mail: fabiodovidio@anonymised.com