Cool Amdrea, 

I found a "workaround" who helps me at this moment take a look:

var testLayer = new OpenLayers.Layer.Vector("Test", {
  projection: new OpenLayers.Projection("EPSG:4326"),
  strategies: [new OpenLayers.Strategy.BBOX()],
  protocol: new OpenLayers.Protocol.HTTP({
    url: 
"/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=test:test&maxFeatures=50&outputFormat=json&viewparams=foo:var;",
    format: new OpenLayers.Format.GeoJSON()
  })
});

i use HTTP protocol and direct call to geoserver ... 

--
Ariel Falduto
afald...@gmail.com




On Jun 18, 2012, at 5:54 PM, Andrea Aime wrote:

> On Mon, Jun 18, 2012 at 9:20 PM, Ariel Falduto <afald...@gmail.com> wrote:
> Hi again guys,
> 
> its possible to pass "viewparams" to WFS (via post payload) like this 
> example... im try a lots of ways buy no-one works =(
> 
> It works only with GET requests. There is a jira about this, no idea if the  
> solution being considered might is openlayers
> friendly though, it's just the simplest one from an implementation point of 
> view:
> https://jira.codehaus.org/browse/GEOS-5160
> 
> Cheers
> Andrea
>  
> 
> -- 
> Ing. Andrea Aime
> GeoSolutions S.A.S.
> Tech lead
> 
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
> 
> phone: +39 0584 962313
> fax:      +39 0584 962313
> mob:    +39 339 8844549
> 
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.youtube.com/user/GeoSolutionsIT
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
> 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to