[OpenLayers-Users] Problems w/ sqlview and passing commas

Tito, Joseph Joseph.Tito at cobham.com
Tue Sep 13 09:19:43 EDT 2011


Charles,

 

Were you passing the viewparams like I am through javascript? Would you
be able to show me your javascript code and the sqlview you created?
Maybe I'm missing something small?

 

From: Charles Galpin [mailto:cgalpin at lhsw.com] 
Sent: Monday, September 12, 2011 3:54 PM
To: Tito, Joseph
Cc: openlayers-users at lists.osgeo.org
Subject: Re: [OpenLayers-Users] Problems w/ sqlview and passing commas

 

Hi Joe

 

 

 

On Sep 12, 2011, at 3:36 PM, Tito, Joseph wrote:

...

	                                viewparams: 'event_type:1,2'

	...

	If I pass the string "event_type:1,2" or "event_type:1\,2",
GeoServer complains:

	 

	                1 layers requested, but found 2 view params
specified

	 

	If I pass the strong "event_type:1\\,2", GeoServer doesn't
return any data. I looked at my GeoServer logs, and it seems that if I
pass it this way, it resolved to:

	 

	                VIEWPARAMS=event_type:1\,2

	 

	Has anyone else had problems passing CSV lists to sqlviews? If
so, how do I get around this?

 

Yes I ran into this recently. In my case '\\,' as the delimiter works
for me though so not sure why that doesn't for you (2.1+ iirc)

 

hth

charles

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110913/431686d6/attachment.html


More information about the Users mailing list