Can't “render/not render” a4joutputpanel rendered=“” “true/false” parameter by managed bean at JBoss Seam and Richfaces

你离开我真会死。 提交于 2020-01-07 07:15:10

问题


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:


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



来源:https://stackoverflow.com/questions/5467320/cant-render-not-render-a4joutputpanel-rendered-true-false-parameter-by-m

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!