title: <p:commandLink> not firing actions at all
body: <p>I can't make my commandLink fire a bean action. </p>
  
  <p>I've tried calling my bean method with <code>&lt;p:commandButton&gt;</code>, <code>&lt;h:commandLink&gt;</code>, <code>&lt;h:outputLink&gt;</code> and <code>&lt;p:commandLink&gt;</code>.</p>
  
  <p>Also, i've used <code>onclick</code>, <code>onmousedown</code>, <code>action</code> and <code>actionListener</code> and none of those worked.
  My code looks like this at the moment:</p>
  
  <p>base.xhtml</p>
  
  <pre><code>&lt;div&gt;
      &lt;h:form&gt;
          &lt;p:commandLink id="logoutButton" action="#{loginController.logout}"&gt;
              &lt;p:graphicImage name="/images/logout.png"/&gt;
          &lt;/p:commandLink&gt;
      &lt;/h:form&gt;
  
      &lt;!-- Rest of code (layout with some layoutUnits) --&gt;
  &lt;/div
  </code></pre>
  
  <p>Bean method (Testing purposes, not the actual method): </p>
  
  <pre><code>public void logout() {
      System.out.println("logged out");
  }
  </code></pre>
  
  <p>According to BalusC, my question is duplicated. I had already searched for similar problems before making this question, and guess what? Nothing worked. Looking at same question that has already been answered, here are my answers to the previously described problems:</p>
  
  <p>1 - The commandLink is inside a <code>form</code>.</p>
  
  <p>2 - The commandLink is not in a nested <code>form</code>.</p>
  
  <p>3 - No UIInput value validation/conversion is showing errors.</p>
  
  <p>4 - The commandLink is not inside a iterating component.</p>
  
  <p>5 - As the pages load, the button is not rendered. I've set it to render only if the user log-ins with a commandLink placed in that same form. It is indeed using AJAX.</p>
  
  <p>6 - The onclick attribute of the UICommand component and the onsubmit attribute of the UIForm are not throwing a JavaScript error.</p>
  
  <p>7 - <code>base.xhtml</code> has a <code>&lt;h:head&gt;</code></p>
  
  <p>8 - The parent of my <code>&lt;h:form&gt;</code> is not being updated/rendered.</p>
  
  <p>9 - Im not using <code>enctype="multipart/form-data"</code> in my form.</p>
  
  <p>10 - I'm not using <code>actionListener</code>.</p>
  
  <p>11 - I'm not using <code>PhaseListener</code> or <code>EventListener</code>.</p>
  
  <p>12 - There is no <code>Filter</code> or <code>Servlet</code> blocking the request to the FacesServlet.</p>
  
  <p>Bonus: </p>
  
  <ul>
  <li>Debugging with Firebug, i've noticed that when i click the logout button i'm getting a code 200 response from the server, meaning it is <code>supposed</code> to be OK. </li>
  <li>My form is in a Template file (base.xhtml). After that form, i am using a <code>&lt;p:layout&gt;</code> element and my website code is inside it's <code>&lt;p:layoutUnit&gt;</code>.</li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/lh2GF.png" alt="a">
  <img src="https://i.stack.imgur.com/aENXn.png" alt="b">
  <img src="https://i.stack.imgur.com/FxInX.png" alt="c"></p>