I have a composite component:
...
<!-- INTERFACE -->
<composite:interface>
...
<composite:attribute name="actionMethod" method-signature="java.lang.String action()" required="true" />
...
</composite:interface>
<!-- IMPLEMENTATION -->
<composite:implementation>
<h:form>
...
<h:commandButton id="captureButton" value="#{msgs.capture}" action="#{cc.attrs.actionMethod}" />
...
</h:form>
</composite:implementation>
and a page which is calling that composite component:
...
<ezcomp:captureTitle actionMethod="#{saveDecisionsBean.captureTitle}" />
...
and a bean which contains the action:
@Named(value="saveDecisionsBean")
@SessionScoped
public class SaveDecisionsBean extends BackingBeanBase {
...
public String captureTitle() {
...
}
}
Now here is my problem. When I try to run this, it says that SaveDecisionsBean doesn't have a property captureTitle. Therefore, I have to add a SaveDecisionsBean#getCaptureTitle()
method. When I do this, it runs just fine. Why should I have to define this method? It says in the <composite:attribute />
that it's a method, and it's used as an action.
EDIT: Here is the exact error message I'm getting: javax.el.PropertyNotFoundException: /index.xhtml @54,86 actionMethod="#{saveDecisionsBean.captureTitle}": The class 'com.example.persistence.SaveDecisionsBean_$$_javassist_209' does not have the property 'captureTitle'.