I've got an orderingList with jsf and want to do something when I click an item in my list. I build a composite component and tried to use it like this:
Composite Component
<cc:interface>
<cc:attribute name="listId" />
<cc:attribute name="value" type="java.util.List"/>
<cc:attribute name="var"/>
<cc:attribute name="clickListener"/>
</cc:interface>
<cc:implementation>
<rich:orderingList id="#{cc.attrs.listId}" value="#{cc.attrs.value}">
<c:set target="#{component}" property="var" value="#{cc.attrs.var}"/>
<a4j:ajax event="click" listener="#{cc.attrs.clickListener}"/>
</rich:orderingList>
</cc:implementation>
I use this orderingList as following:
<mycc:orderingList id="myId" clickListener="#{mybean.doEditAction}">
...
</mycc:orderingList>
In my bean I have the following methods (for testing):
public void doEditAction(AjaxBehaviorEvent pEvent) {
System.out.println("EVENT FIRED WITH AJAX EVENT");
}
public void doEditAction() {
System.out.println("EVENT FIRED WITHOUT PARAMS");
}
public void doEditAction(ActionEvent pActionEvent) {
System.out.println("EVENT FIRED WITH ACTION EVENT");
}
When I open this view I'm getting an PropertyNotFoundException:
The class 'Mybean$Proxy$_$$_WeldClientProxy' does not have the property 'doEditAction'.: javax.el.PropertyNotFoundException:
Whats wrong with my code? I just want to get the selected Item in my bean-method...