<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><base href="x-msg://19367/"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.apple-tab-span
        {mso-style-name:apple-tab-span;}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Figured out a work around for this, so I figured I’d share it with everyone. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Seems like if you pass parameters this way, it fails:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal>var events = new OpenLayers.Layer.WMS("Events",<o:p></o:p></p><p class=MsoNormal style='text-indent:.5in'>"<a href="http://geoserver.joetito.com:80/geoserver/wfs">http://geoserver.joetito.com:80/geoserver/wfs</a>", <o:p></o:p></p><p class=MsoNormal style='text-indent:.5in'>{<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in;text-indent:.5in'>layers: 'events', <o:p></o:p></p><p class=MsoNormal style='margin-left:.5in;text-indent:.5in'>transparent: true, <o:p></o:p></p><p class=MsoNormal style='margin-left:.5in;text-indent:.5in'>format: 'image/gif',<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><b>viewparams: 'event_type:1\\,2' <o:p></o:p></b></p><p class=MsoNormal style='text-indent:.5in'>}<o:p></o:p></p><p class=MsoNormal>);<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>But if you use the mergeNewParams function of the WMS layer, it works just fine.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>var events = new OpenLayers.Layer.WMS("Events",<o:p></o:p></p><p class=MsoNormal> "http://geoserver.joetito.com:80/geoserver/wfs", <o:p></o:p></p><p class=MsoNormal> {<o:p></o:p></p><p class=MsoNormal> layers: 'events', <o:p></o:p></p><p class=MsoNormal> transparent: true, <o:p></o:p></p><p class=MsoNormal> format: 'image/gif' <o:p></o:p></p><p class=MsoNormal> },<o:p></o:p></p><p class=MsoNormal> {<o:p></o:p></p><p class=MsoNormal> isBaseLayer: false<o:p></o:p></p><p class=MsoNormal> }<o:p></o:p></p><p class=MsoNormal>);<o:p></o:p></p><p class=MsoNormal><b>events.mergeNewParams({ viewparams: 'event_types:1\\,2' });<o:p></o:p></b></p><p class=MsoNormal><b><o:p> </o:p></b></p><p class=MsoNormal>Thanks for all the help everyone!<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Joe<o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Charles Galpin [mailto:cgalpin@lhsw.com] <br><b>Sent:</b> Tuesday, September 13, 2011 9:35 AM<br><b>To:</b> Tito, Joseph<br><b>Cc:</b> openlayers-users@lists.osgeo.org<br><b>Subject:</b> Re: [OpenLayers-Users] Problems w/ sqlview and passing commas<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal>On Sep 13, 2011, at 9:19 AM, Tito, Joseph wrote:<o:p></o:p></p></div><p class=MsoNormal><br><br><o:p></o:p></p><div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Charles,</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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?</span><o:p></o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>My javascript boils down to <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><pre id=line1>var viewparams = 'ids:1\\,2\\,3';<o:p></o:p></pre><pre>store.load({ <o:p></o:p></pre><pre><span class=apple-tab-span> </span>...<o:p></o:p></pre><pre> params: {<o:p></o:p></pre><pre> <span class=apple-tab-span> </span>...<o:p></o:p></pre><pre> <span class=apple-tab-span> </span>viewparams: viewparams<o:p></o:p></pre><pre> }<o:p></o:p></pre><pre>}); <o:p></o:p></pre><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Where my store is a <span class=apple-style-span><span style='font-family:"Courier New"'>GeoExt.data.FeatureStore with a OpenLayers.Layer.Vector layer</span></span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span class=apple-style-span><span style='font-family:"Courier New"'>hth</span></span><o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-style-span><span style='font-family:"Courier New"'>charles</span></span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>