| Author |
JSF 2.0 and calling a backing bean method with a parameter - method not found
|
Richard Coats
Greenhorn
Joined: Mar 10, 2011
Posts: 1
|
|
Hi - there have been a couple of other posts on this subject, but none seem to have resolved my problem. I believe I should be able to pass a parameter with an EL method in JSF 2.0. So I have the following code:
and in a backing bean:
If I remove the parameter from the call in the xhtml and in the Java method all works fine, but with the parameter Glassfish 3 gives the following run time error (extract):
SEVERE: javax.el.ELException: /search.xhtml @48,103 styleClass="#{monitor.cellStyle(77)}": Method cellStyle not found
javax.faces.FacesException: javax.el.ELException: /search.xhtml @48,103 styleClass="#{monitor.cellStyle(77)}": Method cellStyle not found
at javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:2214)
at org.richfaces.renderkit.ExtendedDataTableRenderer.encodeRow(ExtendedDataTableRenderer.java:809)
at org.richfaces.renderkit.AbstractRowsRenderer.process(AbstractRowsRenderer.java:89)
I've tried some of the other solutions mentioned elsewhere, i.e. including and explicit dependancy for EL:
and setting the following in web.xml:
and making sure faces-config is correct:
But I still get the same error. Does anyone have any suggestions?
Many thanks.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
|
Well, I'm not really comfortable with putting method calls on the JSF View definition, parameterized or not, but the first thing to check is to make sure you have the EL 2.2 processor running. JSF2 alone isn't enough, if the EL processor you're using doesn't know how to parse the method call properly.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Greg Charles
Bartender
Joined: Oct 01, 2001
Posts: 2542
|
|
I'm working in straight JSF at the moment, and in a version that simply doesn't allow passing parameters like that. However, the last project I did was in Seam, which did allow it. If I remember right though, we had to use full method name. In your case:
Have you tried that?
|
 |
 |
|
|
subject: JSF 2.0 and calling a backing bean method with a parameter - method not found
|
|
|