0

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;
}
cidemir
  • 1
  • 1
  • It would help if you would post the exception. – Max Katz Mar 29 '11 at 04:40
  • Hey Max; I'm taking this exception: **com.sun.facelets.tag.TagAttributeException: /testscreen.xhtml action="#{testBean.renderActive(true)}" Not a Valid Method Expression: #{testBean.renderActive(true)}** – cidemir Mar 29 '11 at 12:12

1 Answers1

0

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

Stefano Travelli
  • 1,889
  • 1
  • 15
  • 18
  • _is actually not a valid method expression in plain JSF EL because method expressions cannot have parameters._ Do you have any source ? Your are actually wrong, as you can pass parameters of any type through an EL expression. –  May 08 '14 at 18:33
  • Parameterized method call was introduced in Java EE 6. See http://docs.oracle.com/cd/E19226-01/820-7627/gjddd/ – Stefano Travelli May 09 '14 at 07:39