title: Can I call methods on beans in composite components?
body: <p>I want to write a more or less gemeric component, where i hand in a controller bean and the componend should display some CRUD buttons.</p>
  
  <p>Following composite component:</p>
  
  <pre><code>&lt;composite:interface&gt;
    &lt;composite:attribute name="controller" /&gt;
    &lt;composite:attribute name="object" /&gt;
  &lt;/composite:interface&gt;
  
  &lt;composite:implementation&gt;
  
    &lt;h:panelGrid columns="3" columnClasses="celltop"&gt;
      &lt;h:commandButton id="save" value="#{msg.saveButtonLabel}"
        action="#{cc.attrs.controller.save}" /&gt;
      &lt;h:commandButton id="delete" value="#{msg.deleteButtonLabel}"
        action="#{cc.attrs.controller.delete(cc.attrs.object)}" /&gt;
      &lt;h:commandButton id="cancel" value="#{msg.backButtonLabel}"
        action="#{cc.attrs.controller.cancel}" immediate="true" /&gt;
    &lt;/h:panelGrid&gt;
  
  &lt;/composite:implementation&gt;
  
  &lt;viewController:buttons controller="customerController" object="#{customerController.customer}"/&gt;
  </code></pre>
  
  <pre class="lang-java prettyprint-override"><code>@Named
  @ConversationScoped
  public class CustomerController implements Serializable {
  
      public String cancel() {
      customer = null;
      if (!conversation.isTransient()) {
          conversation.end();
      }
      return "cancelled";
  }
  </code></pre>
  
  <p>leads to the following exception when I click on the Cancel button:</p>
  
  <pre><code>javax.faces.el.MethodNotFoundException: javax.el.MethodNotFoundException: /resources/components/viewController/buttons.xhtml @25,65 action="#{cc.attrs.controller.cancel}": Method not found: customerController.cancel()
      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:92)
  </code></pre>
  
  <p>Is it not possible to call methods on beans given to CC?</p>