次の JSF ビュー スニペット:
<h:commandLink value="Search" action="#{personSearch.search('SEARCH_TERM')}" styleClass="btn btn-primary" />
<h:commandLink value="Search" action="#{personSearch.search('SPECIALITY_CODE')}" styleClass="btn btn-primary" />
次の Bean メソッドを呼び出します。
public void search(SearchType searchType) {
...
次の列挙型をパラメーターとして受け取ります。
public enum SearchType { SEARCH_TERM, SPECIALITY_CODE }
MethodNotFoundException で失敗しています:
10:34:06,851 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/core-webapp].[FacesServlet]] (http--0.0.0.0-8080-1) Servlet.service() for servlet FacesServlet threw exception: javax.el.MethodNotFoundException: /person/search.xhtml @59,39 action="#{personSearch.search('SPECIALITY_CODE')}": Method not found: Proxy for view class: net.hl.core.view.PersonSearch of EJB: PersonSearch.search(java.lang.String)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:109) [jsf-impl-2.1.7-jbossorg-2.jar:]
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) [jsf-impl-2.1.7-jbossorg-2.jar:]
at javax.faces.component.UICommand.broadcast(UICommand.java:315) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.1.7-jbossorg-2.jar:]
Mojarra 2.1.7-jbossorg-1 で JBoss AS 7.1.1.Final を使用しています。
何がうまくいかないのでしょうか?