I am trying to invoke the #{expressions.getClass()}, however I received exception. From the exception, it seems that characters like ( ) are not allowed. Please see following exception details:
javax.faces.el.ReferenceSyntaxException: javax.el.ELException: Error Parsing: #{
org.jboss.seam.core.expressions.getClass()}
at com.sun.faces.application.ApplicationImpl.createValueBinding(Applicat
ionImpl.java:488)
at org.jboss.seam.jsf.SeamApplication11.createValueBinding(SeamApplicati
on11.java:143)
at org.jboss.seam.jsf.SeamApplication11.createValueBinding(SeamApplicati
on11.java:143)
at com.successfactors.jsfcore.ui.config.SFApplication.createValueBinding
(SFApplication.java:355)
at org.jboss.seam.core.Expressions$1.getFacesValueBinding(Expressions.ja
va:119)
at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:69)
at org.jboss.seam.core.Interpolator.interpolateExpressions(Interpolator.
java:88)
at org.jboss.seam.core.Interpolator.interpolate(Interpolator.java:67)
...
...
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.el.ELException: Error Parsing: #{org.jboss.seam.core.expressions.getClass()}
at org.apache.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:125)
at org.apache.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:150)
at org.apache.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:194)
at org.apache.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:68)
at com.sun.faces.application.ApplicationImpl.createValueBinding(ApplicationImpl.java:484)
... 87 more
Caused by: org.apache.el.parser.ParseException: Encountered " "(" "( "" at line 1, column 43.
Was expecting one of:
"}" ...
"." ...
"[" ...
">" ...
"gt" ...
"<" ...
"lt" ...
">=" ...
"ge" ...
"<=" ...
"le" ...
"==" ...
"eq" ...
"!=" ...
"ne" ...
"&&" ...
"and" ...
"||" ...
"or" ...
"*" ...
"+" ...
"-" ...
"/" ...
"div" ...
"%" ...
"mod" ...
In Expression Language (or EL in short) one doesn't call methods, one resolves properties. Imagine you have a variable called shop
in scope, in Java you would write
shop.getName()
whereas in EL you would write
#{shop.name}
The EL parser will invoke getName()
for you.
if your EL have parameter, you have to directly call method name.
El
#{MyBean.getName('Hello')}
#{MyBean.process(obj)}
Bean
public String getName(String value) {
return value + " World!";
}
public void process(Object object) {
//here your process
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.