title: how to call jsf managed bean inside jquery file
body: <p>i have a jquery file that have comfirm dialog if user chose yes i need to call method from jsf</p>
  
  <p>thats where i need to call jsf managed bean in jquery :</p>
  
  <pre><code> jConfirm('item '+ui.item.context.id+'you want continu ?', 'alerte', function(r) {     
                    if(r)          
                    {
                // i want to call the addmember methode here
               addmember(ui.sender.attr('id'));// i need the right way to call it this is wrong way
                     }
                      else
                      {
                      $(ui.sender).sortable('cancel'); // refuse element to be dropped
                      }
  </code></pre>
  
  <p>and in the jsf managed bean "Managedbeanmembers" i have :</p>
  
  <pre><code>void addmember(String name)
  {
    listmembers.add(name);
  }
  </code></pre>
  
  <p><strong>Edit 1:</strong></p>
  
  <p>i wil try this time to be more clear to explain to you what i need :</p>
  
  <p>i have a method in jsf managed bean that get the value and insert in the database :</p>
  
  <pre><code>    public void exec() {
      FacesContext context = FacesContext.getCurrentInstance();
      Map map = context.getExternalContext().getRequestParameterMap();
      String name1 = (String) map.get("name1");
      String name2 = (String) map.get("name2");
  
      manageTesttable.persist(name1);   
  }
  </code></pre>
  
  <p>in Jsf i include it with :</p>
  
  <pre><code> &lt;p:remoteCommand name="remoteCommandFunctionName"   
                    actionListener="#{gestionduplanning.exec()}"/&gt;
  </code></pre>
  
  <p>and in my Javascript file :</p>
  
  <pre><code>jConfirm('item '+ui.item.context.id+' capacite Cuisson epuise vous voulez continue comme meme ?', 'alerte', function(r) {     
                    if(r)          
                    { 
  
                    remoteCommandFunctionName({name1:'value1', name2:'value2'});
  
                     }
                      else
                      {
                      $(ui.sender).sortable('cancel'); // refuse element to be dropped
                      }
  </code></pre>
  
  <p>but when i insert i have null value why name1 and name2 are null ??</p>