title: JSF 2.0 HTMLCommandButton doesn't call ActionListener in Custom Component
body: <p>I'm currently developing a PopUp with plain JSF on a JBoss AS 7.1 and I'm trying to add a command button in the renderer of the popup-class. The class Popup extends UIPanel.
  The popup is inside a h:form.</p>
  
  <p>The code that adds the button to the popup:</p>
  
  <pre><code>private static final String ID_FIELD_TAG = "id";
  private static final String HTML_DIV_TAG = "div";
  </code></pre>
  
  <p>[...]</p>
  
  <pre><code>writer.startElement(HTML_DIV_TAG, component);
  writer.writeAttribute(ID_FIELD_TAG, konstanten.getPopupFooterId(), ID_FIELD_TAG);
  writer.write("\n");
  if(popup.isShowDialogButtons()){
      HtmlCommandButton cancelButton = new HtmlCommandButton();
      component.getChildren().add(cancelButton);
      cancelButton.setId(konstanten.getPopupFooterCancelButtonId());
      cancelButton.setValue(popup.getCancelText());
      if (!popup.getCancelAction().equals("")) {
          String expression = "#{"+popup.getCancelAction()+"}";
          MethodExpression methodExpression = ExpressionHelper.EXPRESSION_HELPER.
              generateMethodExpression(expression, null,
                  new Class&lt;?&gt;[] { ActionEvent.class });
          cancelButton.addActionListener(new MethodExpressionActionListener(
              methodExpression));
      } else {
          cancelButton.setOnclick("hidePopup('" + componentId + "')");
      }
      cancelButton.encodeAll(context);
  }
  writer.endElement(HTML_DIV_TAG);
  </code></pre>
  
  <p>The button is visible, but nothing happens when clicking it, except for a page-reload.</p>
  
  <p>popup.getCancelAction() returns "NameOfTheBean.NameOfTheMethod".</p>
  
  <p>There are no error Messages.</p>
  
  <p>Thanks for the help!</p>
  
  <p>EDIT:
  I tried to replace the HTMLCommandButton with a HTMLCommandLink to see, whether the form is the problem or not. The link looks like it's working, but still nothing gets called.</p>