title: Cannot pass parameter from javascript to JSF Bean using primefaces RemoteCommand
body: <p>I have a JSF site using primeFaces. I cannot get any parameters from my javascript to my bean using P:RemoreCommand. Here is my code:</p>
  
  <p>xhtml:</p>
  
  <pre><code>&lt;p:remoteCommand name="scaleLines" actionListener="#{mapBean2.scaleLines}"  update="mapPanel"/&gt;
  </code></pre>
  
  <p>Then later to call it:</p>
  
  <pre><code>map.on('viewreset', function(){  
            scaleLines({newZoom:'10'});
  
  
             });
  </code></pre>
  
  <p>Session Scoped ManagedBean:</p>
  
  <pre><code>public void scaleLines(){
  
     String newZoom = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("newZoom");
  
      if(newZoom == null){
          Logger.getAnonymousLogger().info("Zoom level is null");
      }
      else{
      Integer newZoomInt = Integer.parseInt(newZoom);
      this.mapzoomLevel = newZoomInt;
      for(ZsyMap1Linetest line : allTestLines){
          line.setWeight(((line.getWeight()*newZoomInt)/(6)));
      }
     }
  }
  </code></pre>
  
  <p>This does call the method, but when I attach a debugger, I can see that newZoom is always null meaning that the parameter does not get passed. I hhave read other posts and I can't see why it would not get passed. I also tried this using a JSF managedBean for the backing bean and a CDI named bean, bOth had the same results.</p>