Any syntax differences in 8.2 designer compared to 7.x?

Hi,

Can anybody please let me know if there is any syntax difference between 8.2 and 7.2 designer when developing CAF pages.

In the databinging property of the filed, i am getting the following error in 8.2 which works fine in 7.2.

Description Resource Path Location Type
Invalid expression for property “Value”: Error Parsing: #{StartCordisIIRDefaultviewView.addressOverwriteFlag?StartCordisIIRDefaultviewView.startCordisIIR.mu490_startiir.applicationResourcesProvider[“deliver.to.name”]:StartCordisIIRDefaultviewView.startCordisIIR.mu490_startiir.applicationResourcesProvider[“consignee.name”]}

Please let me know your thoughts.

Thanks
Gayathri G

Hi Gayathri,

We also faced the same problem (we are in course of migration). The ternary operator does not work anymore:

(condition:'true'?'false')

I think it is a backward compatibility bug in the CAF implementation.

br,
Vlad

The following was working fine for me (trivial example value of a css property)

color: #{true ? "red" : "green"};

Hi,

I can see that

(condition:'true'?'false')

causes compilation problems when it is used as value inside a “Text” control (g11n implemented):

#{!MyViewDefaultviewView.conditionFoo?MyViewDefaultviewView.myView.portletResourcesProvider["g11n.myView.default.first_text"]:MyViewDefaultviewView.myView.portletResourcesProvider["g11n.myView.default.second_text"]}

br,
Vlad

Hi,

Thank you for the replies. But yeah the ternary operator doesnt seem to work for me.

When i did remove it from the UI and trying to upload to MWS its throwing the following error:

Build path contains duplicate entry: ‘org.eclipse.jst.j2ee.internal.web.container’

Any thoughts on this.

Thanks
Gayathri

That’s not the same as I’m seeing. The following worked for me when used as the value of a Text control:

#{!true ? StuffApp.applicationResources["default.text.sample.1"] : StuffApp.applicationResources["default.text.sample.2"]}

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.

Hi,

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:

#{!MyPageDefaultviewView.isFlagTrue?“Text1”:“Text2”]}"

Any hints?

Thank you.

Regards,

Olimpiu POP

[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)

Hi,

thanks Javier. Leaving blank spaces around the operator solves the problem.

Thanks a lot. Have a nice week-end.

Regards,

Olimpiu