title: p:commandLink actionListener is processed for each row of p:dataTable while rendering the page
body: <p>I have a dataTable that shows data stored in a database. One of the column contains a commandLink (p:commandLink) to edit selected row which is fine.</p>
  
  <p>I have a problem during the rendering of my xhtml page. It seems that the method of backingBean in the actionListener attribute of commandLink is processed for every row in the table, but the actionListener should be processed only when link is clicked.</p>
  
  <p>Here is my xhtml page (part of):</p>
  
  <pre><code>&lt;h:form id="formElenco"&gt;
      &lt;p:dataTable id="dt1" value="#{myBean.itemList}" var="item"&gt;
          &lt;f:facet name="header"&gt;
              &lt;h:outputText value="header" /&gt;
          &lt;/f:facet&gt;
          &lt;p:column&gt;
              &lt;f:facet name="header"&gt;
                  &lt;h:outputText value="Name" /&gt;
              &lt;/f:facet&gt;
              &lt;h:outputText value="#{item.name}"/&gt;
          &lt;/p:column&gt;
          &lt;p:column&gt;
              &lt;f:facet name="header"&gt;
                  &lt;h:outputText value="value" /&gt;
              &lt;/f:facet&gt;
              &lt;h:outputText value="#{item.value}"/&gt;
          &lt;/p:column&gt;
          &lt;p:column&gt;
              &lt;p:commandLink id="lnkItemUpdate" value="Edit"
                              onstart="document.getElementById('divUpdateItem').style.display = 'block';"
                              actionListener="#{myBean.updateItemAction(item)}" update=":formUpdateItem" /&gt;
          &lt;/p:column&gt;
  
      &lt;/p:dataTable&gt;
  &lt;/h:form&gt;
  
  &lt;div id="divUpdateItem" style="display:none" &gt; 
      &lt;h:form id="formUpdateItem"&gt;
          Nome &lt;h:inputText value="#{myBean.name}" /&gt;&lt;br/&gt;
          Met  &lt;h:inputText value="#{myBean.value}" /&gt;&lt;br/&gt;
          &lt;h:inputHidden value="#{myBean.id}" /&gt;
          &lt;h:commandButton action="#{myBean.updateItemAction}" value="Save" /&gt;
      &lt;/h:form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here are myBean's method (myBean is requestScoped):</p>
  
  <pre><code>public String updateItemAction(Entity item){
      this.setId(item.getId());
      this.setName(item.getName());
      this.setValue(item.getValue());
      return null;
  }
  
  public String updateItemAction() {
      Entity entity = new Entity();
      entity.setId(this.getId());
      entity.setName(this.getName());
      entity.setVAlue(this.getValue());
      updateEntityQueryMethod(entity);
      return null;
  }
  </code></pre>