title: How can I prevent page refresh on click of <h:commandLInk>
body: <p>I am trying to prevent a page refresh when the user clicks on <code>&lt;h:commandLink&gt;</code> in my applicaton.  I tried this but it does not work:</p>
  
  <p><strong>Updated :</strong></p>
  
  <pre><code> &lt;h:dataTable value="#{person.IssueList}" var="p" &gt;
      &lt;h:column style="width: 20px"&gt;
          &lt;f:facet name="header"&gt;Issue&lt;/f:facet&gt;
          &lt;h:commandLink value="#{p.IssueDesc}"/&gt;
      &lt;/h:column&gt;
  
      &lt;h:column style="width: 20px"&gt;
           &lt;f:facet name="header"&gt;Reporting Date&lt;/f:facet&gt;
           &lt;p:calendar  value="#{p.issuerepDt}" rendered="#{p.editable}"                 id="CalendarId"/&gt;                
           &lt;h:outputText value="#{p.issuerepDt}" rendered="#{not p.editable}" /&gt;
      &lt;/h:column&gt;
  
      &lt;h:column&gt;
              &lt;f:facet name="header"&gt;Action&lt;/f:facet&gt;
          &lt;h:commandLink  value="Edit" action="#{person.editAction(p)}"&gt;
              &lt;f:ajax execute="@form" render="@none" /&gt;          
          &lt;/h:commandLink&gt;    
  
              &lt;/h:column&gt;
      &lt;/h:dataTable&gt;
  </code></pre>
  
  <p>java snippet : </p>
  
  <pre><code>public void  editAction(PersonIssues pIssues) {
      pIssues.setEditable(true);
  }
  </code></pre>
  
  <p>I am using concept of <a href="http://www.mkyong.com/jsf2/how-to-update-row-in-jsf-datatable/" rel="nofollow">editing jsf datatable</a> from MKyong.I </p>