Jsf java.lang.IllegalArgumentException:无法将类java.lang.String的[navigation Output]类型转换为类javax.el.MethodExpression

Jsf java.lang.IllegalArgumentException:无法将类java.lang.String的[navigation Output]类型转换为类javax.el.MethodExpression,jsf,composite-component,Jsf,Composite Component,我试图在我的web应用程序中使用JSF复合组件,但我运行页面并单击导航栏,发现了这个错误 更新 我将更改为 我在link上收到这个消息 V:此链接已禁用,因为无法匹配导航案例 XHTML 第一个移动JSF页面 #框1{ 左边缘:25%; 利润率最高:55%; 宽度:50%; 边框样式:实心; } 添加产品 虚拟页面添加产品 复合组件 <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C

我试图在我的web应用程序中使用JSF复合组件,但我运行页面并单击导航栏,发现了这个错误 更新

我将
更改为

我在link上收到这个消息

V:此链接已禁用,因为无法匹配导航案例

XHTML


第一个移动JSF页面
#框1{
左边缘:25%;
利润率最高:55%;
宽度:50%;
边框样式:实心;
}
添加产品
虚拟页面添加产品

复合组件

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:cc="http://xmlns.jcp.org/jsf/composite"
       xmlns:m="http://xmlns.jcp.org/jsf/html">

    <!-- INTERFACE -->
    <cc:interface>
        <cc:attribute name="caption" required="true"/>
        <cc:attribute name="jsf" required="true"/>
    </cc:interface>

    <!-- IMPLEMENTATION -->
    <cc:implementation>
        <m:commandLink action="#{cc.attrs.jsf}" value="#{cc.attrs.caption}" />
    </cc:implementation>
</html>

发生错误:
javax.el.ELException:java.lang.IllegalArgumentException:无法将java.lang.String类型的V转换为javax.el.MethodExpression类
-堆栈跟踪
javax.faces.el.EvaluationException:javax.el.eleException:java.lang.IllegalArgumentException:无法将java.lang.String类的V类型转换为javax.el.MethodExpression类
位于javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:101)
位于com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
在javax.faces.component.UICommand.broadcast(UICommand.java:315)
位于javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
位于javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
位于com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
位于com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
在com.sun.faces.lifecycle.LifecycleImpl.execute上(LifecycleImpl.java:198)
位于javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
位于org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
位于org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
位于org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
位于org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
位于org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
位于com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
位于org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
位于org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
位于org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
位于com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
位于org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
位于org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
位于org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
位于org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
位于org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
在org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)上
在org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
位于org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
位于org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
位于org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
位于org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
位于org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
位于org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
位于org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
位于org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
位于org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
运行(Thread.java:724)
原因:javax.el.ELException:java.lang.IllegalArgumentException:无法将类java.lang.String的V转换为类javax.el.MethodExpression
在com.sun.el.ExpressionFactoryImpl.胁迫类型(ExpressionFactoryImpl.java:79)上
位于javax.el.ELContext.convertToType(ELContext.java:473)
在com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:229)
位于org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
位于com.sun.faces.facelets.el.ContextalCompositeValueExpression.getValue(ContextalCompositeValueExpression.java:158)
位于com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
位于com.sun.faces.facelets.tag.TagAttributeImpl$AttributeLookupMethodExpression.invoke(TagAttributeImpl.java:465)
位于javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
... 35多
原因:java.lang.IllegalArgumentException:无法将类型为java.lang.String的V转换为类javax.el.MethodExpression
位于com.sun.el.lang.ELSupport.impresseType(ELSupport.java:417)
在com.sun.el.ExpressionFactoryImpl.胁迫类型(ExpressionFactoryI
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:cc="http://xmlns.jcp.org/jsf/composite"
       xmlns:m="http://xmlns.jcp.org/jsf/html">

    <!-- INTERFACE -->
    <cc:interface>
        <cc:attribute name="caption" required="true"/>
        <cc:attribute name="jsf" required="true"/>
    </cc:interface>

    <!-- IMPLEMENTATION -->
    <cc:implementation>
        <m:commandLink action="#{cc.attrs.jsf}" value="#{cc.attrs.caption}" />
    </cc:implementation>
</html>
<m:commandLink action="#{cc.attrs.jsf}" value="#{cc.attrs.caption}" />
<m:link outcome="#{cc.attrs.jsf}" value="#{cc.attrs.caption}" />