myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samba <saas...@gmail.com>
Subject Ternary Operators with EL not working in JBoss
Date Tue, 08 Apr 2008 12:59:58 GMT
Hi!
I'm facing a strange situation where JBoss is throwing an

*

com.sun.facelets.tag.TagAttributeException: /home.xhtml @71,83
value="#{row.department!=null?row.department:'Department' }" Error
Parsing: #{row.department!=null?row.department:'Department' }
	at com.sun.facelets.tag.TagAttribute.getValueExpression(TagAttribute.java:259)
	at com.sun.facelets.tag.jsf.ValueHolderRule$DynamicValueExpressionMetadata.applyMetadata(ValueHolderRule.java:101)
	at com.sun.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:36)
	at com.sun.facelets.tag.MetaTagHandler.setAttributes(MetaTagHandler.java:62)
	at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:144)
	at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
	at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
	at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

      .....................................................................................

      .....................................................................................

Caused by: javax.el.ELException: Error Parsing:
#{row.department!=null?row.department:'Department' }
	at org.apache.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:125)
	at org.apache.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:146)
	at org.apache.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:190)
	at org.apache.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:68)
	at com.sun.facelets.tag.TagAttribute.getValueExpression(TagAttribute.java:256)
	... 53 more
Caused by: org.apache.el.parser.ParseException: Encountered
"row.department: \'Department\'" at line 1, column 24.
Was expecting one of:
    "(" ...
    <IDENTIFIER> ...
    <NAMESPACE> <IDENTIFIER> ...

	at org.apache.el.parser.ELParser.generateParseException(ELParser.java:1874)
	at org.apache.el.parser.ELParser.jj_consume_token(ELParser.java:1754)
	at org.apache.el.parser.ELParser.NonLiteral(ELParser.java:1136)
	at org.apache.el.parser.ELParser.ValuePrefix(ELParser.java:1030)
	at org.apache.el.parser.ELParser.Value(ELParser.java:978)
	at org.apache.el.parser.ELParser.Unary(ELParser.java:960)
	at org.apache.el.parser.ELParser.Multiplication(ELParser.java:723)
	at org.apache.el.parser.ELParser.Math(ELParser.java:643)
	at org.apache.el.parser.ELParser.Compare(ELParser.java:455)
	at org.apache.el.parser.ELParser.Equality(ELParser.java:349)
	at org.apache.el.parser.ELParser.And(ELParser.java:293)
	at org.apache.el.parser.ELParser.Or(ELParser.java:237)
	at org.apache.el.parser.ELParser.Choice(ELParser.java:203)
	at org.apache.el.parser.ELParser.Expression(ELParser.java:183)
	at org.apache.el.parser.ELParser.DeferredExpression(ELParser.java:121)
	at org.apache.el.parser.ELParser.CompositeExpression(ELParser.java:49)
	at org.apache.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:93)

*

where as the same thing is working fine in Tomcat 6.0.16
This occurs only when I use ternary operations in XHTML pages.

Any idea why this is happening?

I think may be Jboss is using an older version of Tomcat with older EL
implementation which could not parse the ternary operations!

If that is true, is there any way to override that jar with the one I have
in my WEB-INF/lib?


-- 
Regards...
Samba.

Mime
View raw message