title: Sending values with <h:commandbutton> not working working properly in jsf
body: <p>When i tried to send some values with h:commandButton... i recieved null value in the bean...</p>
  
  <p>my xhtml code is:</p>
  
  <pre><code>  &lt;p:commandButton action="#{favouriteAction.setFavourite}"  value="Add as Favorite" rendered="#{favouriteBean.favouriteButton}"&gt;
    &lt;f:setPropertyActionListener target="#{favouriteAction.ngoID}" value="#{InsertDataDaoService.ngo_id}"&gt;&lt;/f:setPropertyActionListener&gt; 
    &lt;/p:commandButton&gt;    
  </code></pre>
  
  <p>In the backing bean i just tried to print the value which i passed with my command button,but it becomes null...</p>
  
  <p>In favouriteAction.java(My backing Bean)</p>
  
  <pre><code>  public Integer ngoID;
  
  public Integer getNgoID() {
  return ngoID;
  }
  
  
  public void setNgoID(Integer ngoID) {
  this.ngoID = ngoID;
  }
  
      public String setFavourite(){
  
        System.out.println("Ngo id: "+ngoID);
     System.out.println("Ngo id: "+getNgoID);
  
      return "";
  }
  </code></pre>
  
  <p>In console i dint get any exceptions, my o/p is </p>
  
  <p>Ngo id: 0
  Ngo id: 0</p>
  
  <p>that is null, and it doesnt get passed.. </p>