9 Replies Latest reply on Nov 10, 2009 8:54 AM by Marco Huber

    [CDK] Extending a component not working correctly.

    Marco Huber Newbie

      Hi all,

      I have a strange problem, generating JSF components with the CDK. I'm am very new with the CDK, so maybe this is a beginner error :-)

      I wrote a component extending the a4j:commandButton with some more attributes. If I use this component the action method is executed at rendering time in the JSF page, but it should be executed if I click on the button.

      To validate the problem I copied the original cdk a4j:commandButton files into my taglib project. I don't change any line of code, so that is still the same commandButton.
      If I use this copied commandButton in my JSF page, the action is also executed.

      Here a part of my JSF page:

      <a4j:outputPanel id="addItemControls" rendered="#{invoice.editable}">
       <myLib:commandButton action="#{invoice.initLineItem()}"
       reRender="addItemPanel, addItemInput"
       style="width: 20px;"/>

      Do I have to create my own outputPanel for my components? Did I miss something?

      Any suggestion is welcome.