title: Primefaces p:commandButton with action not called
body: <p>I've got some some troubles with Primefaces 3.2 and JSF 2.1.</p>
  
  <p>My Code like this:</p>
  
  <pre><code>&lt;p:toolbar id="jeditortoolbar" styleClass="jeditortoolbar"&gt;
        &lt;p:toolbarGroup align="left" height="25" style="height:25px"&gt;
          &lt;p:commandButton type="button" title="#{msg.beenden}"/&gt;
          &lt;p:commandButton type="button" title="#{msg.neu}"/&gt;
        &lt;/p:toolbarGroup&gt;
  &lt;/p:toolbar&gt;
  </code></pre>
  
  <p>When I take a look at Primefaces Showcase my p:commandButton need </p>
  
  <pre><code>actionListener="#{myBean.myActionMethod}"
  </code></pre>
  
  <p>and my Bean need a Method like</p>
  
  <pre><code>public void myActionMethod(){}
  </code></pre>
  
  <p>I have a <code>h:form</code> around my <code>p:toolbar</code> tag!</p>
  
  <p>My Bean is ViewScoped.</p>
  
  <p>My Workaround is 
  In <code>*.xhtml</code> File</p>
  
  <pre><code>&lt;p:commandButton type="button" title="#{msg.neu}" onclick="addNewEmptyFile()"/&gt;
  &lt;p:remoteCommand name="addNewEmptyFile" update=":codeTabForm"&gt;
     &lt;f:setPropertyActionListener value="#{true}" target="#{myBean.myEvent}"/&gt;
  &lt;/p:remoteCommand&gt;
  </code></pre>
  
  <p>In MyBean.java</p>
  
  <pre><code>private String myEvent;
  
  public void setMyEvent(String value){ myActionMethod();}
  </code></pre>
  
  <p>This works for me but I think this is very dirty code.</p>
  
  <p>Can everyone help me?</p>