Can't “render/not render” a4joutputpanel rende

2019-09-01 04:50发布

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.xhtml action="#{testBean.renderActive(true)}" Not a Valid Method Expression: #{testBean.renderActive(true)}

Can anyone help me about that?

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;
}

1条回答
混吃等死
2楼-- · 2019-09-01 05:13

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

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

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).

查看更多
登录 后发表回答