Ajax parameter not getting passed if not manipulated
<p>So I'm getting this weird bug that maybe I'm missing out on something,</p>

<p>I have this js script:</p>

<pre><code>function openStationLoadWindow(inStationString) {

theStationString = inStationString;
$.ajax( { 
    url : "Ajax.faces?popup=true",
    type : "GET",
    cache : false,
    contentType : 'application/json; charset=utf-8',
    data : {
        action : "retrieveStnLoadWindow",
        selectedStations : theStationString
    },
</code></pre>

<p>and at the ajax handler I'm trying to get selected stations:</p>

<pre><code>String theStationString = itsContext.getExternalContext().getRequest().getParameter( "selectedStations" );
</code></pre>

<p>theStationString is empty. However when i append a string at the js portion:</p>

<pre><code>function openStationLoadWindow(inStationString) {

**theStationString = inStationString + "ANY";**
$.ajax( { 
    url : "Ajax.faces?popup=true",
    type : "GET",
    cache : false,
    contentType : 'application/json; charset=utf-8',
    data : {
        action : "retrieveStnLoadWindow",
        selectedStations : theStationString
    },
</code></pre>

<hr>

<pre><code>String theStationString = itsContext.getExternalContext().getRequest().getParameter( "selectedStations" );
</code></pre>

<p>I am able to get theStationString + "ANY". </p>

<p>Any ideas?</p>