Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf 异常EL表达式不平衡:_Jsf_Jsf 2_Primefaces - Fatal编程技术网

Jsf 异常EL表达式不平衡:

Jsf 异常EL表达式不平衡:,jsf,jsf-2,primefaces,Jsf,Jsf 2,Primefaces,我在我的web应用程序中使用JSF。我将参数从我的复合组件传递到bean,但我得到了EL表达式不平衡异常。下面是我试图使用的代码 <h:panelGroup binding="#{datatableManagedBean.getDynamicDataTableGroup(#{cc.attrs.id})"/> 但我正在变得异常 javax.el.ELException: EL Expression Unbalanced: ... #{datatableManagedBean.ge

我在我的web应用程序中使用JSF。我将参数从我的复合组件传递到bean,但我得到了EL表达式不平衡异常。下面是我试图使用的代码

<h:panelGroup binding="#{datatableManagedBean.getDynamicDataTableGroup(#{cc.attrs.id})"/>

但我正在变得异常

javax.el.ELException: EL Expression Unbalanced: ... #{datatableManagedBean.getDynamicDataTableGroup(#{cc.attrs.id})
    at com.sun.faces.facelets.el.ELText.findVarLength(ELText.java:476)
    at com.sun.faces.facelets.el.ELText.parse(ELText.java:396)
    at com.sun.faces.facelets.el.ELText.parse(ELText.java:347)
    at com.sun.faces.facelets.el.ELText.parse(ELText.java:338)
    at com.sun.faces.facelets.el.ELText.isLiteral(ELText.java:321)
    at com.sun.faces.facelets.tag.TagAttributeImpl.<init>(TagAttributeImpl.java:127)
javax.el.ELException:el表达式不平衡:#{datatableManagedBean.getDynamicDataTableGroup(#{cc.attrs.id})
在com.sun.faces.facelets.el.ELText.findVarLength(ELText.java:476)上
位于com.sun.faces.facelets.el.ELText.parse(ELText.java:396)
位于com.sun.faces.facelets.el.ELText.parse(ELText.java:347)
位于com.sun.faces.facelets.el.ELText.parse(ELText.java:338)
位于com.sun.faces.facelets.el.ELText.isLiteral(ELText.java:321)
位于com.sun.faces.facelets.tag.TagAttributeImpl.(TagAttributeImpl.java:127)

Ant的帮助将非常有用。提前感谢。

不要在另一个EL中使用EL表达式,您还忘记关闭第一个EL

使用此选项并注意差异


#{datatableManagedBean.getDynamicDataTableGroup(cc.attrs.id)}

即使缺少“}”也会记录错误。比如:

<c:forEach items="#{customerRegistrationBean.accountWebData.selectedAccount" var="account">
...

...

Daniel:如果在另一个EL中使用EL表达式不是正确的方法,是否还有其他方法可以实现它。我不确定您想要实现什么,但您应该用
{myBean.myMethod(someVar)}来包装整个EL表达式
其中
someVar
可以从内部获取
ui:repeat
/
h:datatable
/
ui:param
/
someOtherBean.someOtherValue
/etc。。。