无法“渲染/不渲染".a4joutputpanel rendering =“"“对/错"JBoss Seam和Richfaces中托管bean的参数 [英] Can't "render/not render" a4joutputpanel rendered="" "true/false" parameter by managed bean at JBoss Seam and Richfaces

查看:62
本文介绍了无法“渲染/不渲染".a4joutputpanel rendering =“"“对/错"JBoss Seam和Richfaces中托管bean的参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的接缝和面孔.我想通过给Managed Bean隐藏/显示rendered =""true/false"参数来显示a4joutputpanel.但是我正在接受此异常:

I'm new on seam and richfaces. I want to hide/show a4joutputpanel by rendered="" "true/false" parameter by giving Managed Bean.But ı'm taking this exception:

com.sun.facelets.tag.TagAttributeException:/testscreen.xhtmlaction =#{testBean.renderActive(true)}"不是有效的方法表达式:#{testBean.renderActive(true)}

有人可以帮我吗?

这是我的xhtml和托管bean代码:

Here's my xhtml and managedbean codes:

<a4j:commandButton action="#{testBean.renderActive(true)}" reRender="MyPanel" value="Start" />

<a4j:outputPanel id="MyPanel">
<s:div rendered="#{testBean.renderProperty}">
........
</s:div>
</a4j:outputPanel>

ManagedBean

public void renderActive(Boolean rendeBoolean){
this.renderProperty=rendeBoolean; }

private Boolean renderProperty;

public Boolean getRenderProperty() {
return renderProperty;
}

public void setRenderProperty(Boolean renderProperty) {
this.renderProperty = renderProperty;
}

推荐答案

#{testBean.renderActive(true)} 实际上不是纯JSF EL中的有效方法表达式,因为方法表达式不能具有参数

#{testBean.renderActive(true)} is actually not a valid method expression in plain JSF EL because method expressions cannot have parameters.

这对jboss-el.jar提供的EL扩展名有效.

It's valid with EL extension provided by jboss-el.jar, though.

如果未将应用程序打包为war,请检查此jar是否存在于应用程序类路径中,即EAR或WEB-INF/lib中.(请参阅参考文档中的 30.3.1包装).

Check if this jar is present in the application classpath, that is in the EAR or in WEB-INF/lib if you don't package the application as war. (see § 30.3.1 Packaging in the reference documentation).

这篇关于无法“渲染/不渲染".a4joutputpanel rendering =“"“对/错"JBoss Seam和Richfaces中托管bean的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆