Also, your build path error doesn’t have any relation to the use of the Ternerary operator. I’d recommend trying to repair the build path of your project or use the CAF Tools → Repair CAF Project on the context menu in your Navigator or Project Explorer View.
I have the same problem as Vlad. On a button the label uses a ternary operator to display the localized content. When the page is rendered the exception provided in the lower part of the post is thrown. Replacing the localized strings (MyPage.portletResources[“g11n.MyPage.default.restore”]) with plain strings (“Text”) fixes the problem:
[POP.001.0002] A "java.lang.RuntimeException" occurred with the Message "javax.faces.el.ReferenceSyntaxException: javax.el.ELException: Error Parsing: #{!MyPageDefaultviewView.isFlagTrue?MyPage.portletResources["g11n.MyPage.default.löschen"]:MyPage.portletResources["g11n.MyPage.default.restore"]}"
com.sun.el.parser.ParseException: Encountered ":MailboxInboxResults" at line 1, column 143.
Was expecting one of:
"." ...
"[" ...
":" ...
">" ...
"gt" ...
"<lt>=" ...
"ge" ...
"<=" ...
"le" ...
"==" ...
"eq" ...
"!=" ...
"ne" ...
"&&" ...
"and" ...
"||" ...
"or" ...
"*" ...
"+" ...
"-" ...
"/" ...
"div" ...
"%" ...
"mod" ...
at com.sun.el.parser.ELParser.generateParseException(ELParser.java:1664)
at com.sun.el.parser.ELParser.jj_consume_token(ELParser.java:1544)
at com.sun.el.parser.ELParser.Choice(ELParser.java:229)
at com.sun.el.parser.ELParser.Expression(ELParser.java:208)
at com.sun.el.parser.ELParser.DeferredExpression(ELParser.java:146)
at com.sun.el.parser.ELParser.CompositeExpression(ELParser.java:74)
at com.sun.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:139)
at com.sun.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:188)
at com.sun.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:232)
at com.sun.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:92)
at com.sun.faces.application.ApplicationImpl.createValueBinding(ApplicationImpl.java:484)
at com.webmethods.caf.faces.application.CAFApplication.createOrigValueBinding(CAFApplication.java:53)
at com.webmethods.caf.faces.application.CAFApplication.createValueBinding(CAFApplication.java:126)
at com.webmethods.caf.faces.view.cache.BaseCachedBuilder.addProperty(BaseCachedBuilder.java:285)
at com.webmethods.caf.faces.view.cache.BaseCachedBuilder.addProperty(BaseCachedBuilder.java:94)
at com.webmethods.caf.faces.view.xml.XMLViewBuilder.endProperty(XMLViewBuilder.java:439)
at com.webmethods.caf.faces.view.xml.XMLViewBuilder.endElement(XMLViewBuilder.java:167)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at com.webmethods.caf.faces.view.xml.XMLViewHandler.createBuilder(XMLViewHandler.java:44)
at com.webmethods.caf.faces.view.BaseViewHandler.createView(BaseViewHandler.java:88)
at com.webmethods.caf.faces.portlet.PortletLifecycle.setViewId(PortletLifecycle.java:508)
at com.webmethods.caf.faces.portlet.PortletLifecycle.restore(PortletLifecycle.java:304)
at com.webmethods.caf.faces.portlet.PortletLifecycle.render(PortletLifecycle.java:187)
at com.webmethods.caf.faces.portlet.FacesPortlet.render(FacesPortlet.java:397)
at com.webmethods.portal.framework.portletcontainer.impl.PortletApplicationHandler.process(PortletApplicationHandler.java:495)
at com.webmethods.portal.framework.portletcontainer.servlet.PortletServlet.service(PortletServlet.java:58)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:192)
at com.webmethods.portal.framework.portletcontainer.PortletContainer.dispatch(PortletContainer.java:221)
at com.webmethods.portal.framework.portletcontainer.PortletContainer.process(PortletContainer.java:130)
at com.webmethods.portal.framework.portletcontainer.PortletContainer.renderPortlet(PortletContainer.java:103)
at com.webmethods.portal.framework.portletcontainer.beans.PortletBean.processRequest(PortletBean.java:193)
at com.webmethods.portal.framework.portletcontainer.beans.PortletBean.getContentInternal(PortletBean.java:82)
at com.webmethods.portal.framework.portlet.beans.BasicPortletBean.getContent(BasicPortletBean.java:151)
at com.webmethods.portal.mech.portlet.impl.PortletMechanics.getPortletContent(PortletMechanics.java:96)
at com.webmethods.portal.mech.storage.page.PortletHelper.renderContent(PortletHelper.java:428)
at com.webmethods.portal.mech.storage.page.PortletHelper.renderContent(PortletHelper.java:400)
at com.webmethods.portal.framework.presentation.renderers.PortalPageSubRenderer.renderPortlet(PortalPageSubRenderer.java:560)
at com.webmethods.portal.framework.presentation.renderers.PortalPageSubRenderer.renderColumn(PortalPageSubRenderer.java:397)
at com.webmethods.portal.framework.presentation.renderers.PortalPageSubRenderer.renderRow(PortalPageSubRenderer.java:253)
at com.webmethods.portal.framework.presentation.renderers.PortalPageSubRenderer.renderContent(PortalPageSubRenderer.java:135)
at com.webmethods.portal.framework.presentation.renderers.PortalPageSubRenderer.subrender(PortalPageSubRenderer.java:113)
at com.webmethods.portal.framework.presentation.renderers.NoodleRenderer.renderPageContent(NoodleRenderer.java:57)
at com.webmethods.portal.framework.presentation.renderers.DefaultRenderer.render(DefaultRenderer.java:224)
at com.webmethods.portal.framework.presentation.PresentationManager.handlePres(PresentationManager.java:370)
at com.webmethods.portal.framework.dispatch.DispatchManager.pres(DispatchManager.java:623)
at com.webmethods.portal.framework.dispatch.DispatchManager.handle(DispatchManager.java:458)
at com.webmethods.portal.framework.dispatch.DispatchManager.handleDispatch(DispatchManager.java:369)
at com.webmethods.portal.framework.impl.PortalServlet.service(PortalServlet.java:272)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at com.webmethods.portal.framework.impl.NTLMFilter.doFilter(NTLMFilter.java:50)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.webmethods.caf.faces.servlet.GZIPFilter.doFilter(GZIPFilter.java:42)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
hi
I made a short test and it worked fine. Have a look at the attached sample project (8.2).
A possible difference could be leaving blank spaces around the operators.
hope this helps,
Javier TestingEL.zip (13.5 KB)