I'm pretty new to JSF (Just 1 week old) and developing first component. Component is something like a table which takes a collection as input and renders the contents in a table format. In addition to that renders a "Remove" link at the end of each row.
I created "Composite" component (.xhtml) and ComponentType (a java class with @FacesComponent).
I got the complete table rendering and "Remove" link is displayed in each row. Now trying to add with action that is defined in my class with @FacesComponent.
<a4j:commandLink action="#{cc.removeRow(rowKey)}" value="Remove"/>
In my component (java class) I have this method removeRow(Integer rowKey) defined. But on clicking this "Remove" link the action is not triggered. I have "h:form" also defined in the component.
Any help or pointers is much appreciated.
EDITED: just looked at this question How to implement a dynamic list with a JSF 2.0 Composite Component? and it resembles almost my requirement. Just one thing I'm not sure is what would be the form action when it is rendered and if I click the button in the component, how it would call the method inside its own component bean.