<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Best way to read values from the CMS in a JSF dialog</title><link>https://answers.axonivy.com/questions/118/best-way-to-read-values-from-the-cms-in-a-jsf-dialog</link><description>&lt;p&gt;Hi there
I wonder what is the best way to get a CMS value in a value-field of a JSF/HMTL dialog.&lt;/p&gt;
&lt;p&gt;My first Approach was: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;h:outputText value="&amp;lt;%=ivy.cms.co('/#{data.type}/dialog/infoText')%&amp;gt;" &amp;lt;/h:outputText&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But this wont work due to the '&amp;lt;' in front of the '%'. My current apporach now is to read the CMS values in the dialog-bean by a scriptstep. Then accessing them by &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;h:outputText value="&amp;lt;%=ivy.cms.co('/#{data.lblInfoText')%&amp;gt;" &amp;lt;/h:outputText&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but this can't be the best solution. Does anyone knows the proper way to add CMS values in a jsf value-field?&lt;/p&gt;
&lt;p&gt;thx in advance!&lt;/p&gt;
&lt;p&gt;EDIT:&lt;/p&gt;
&lt;p&gt;This is the exact line I use in the code.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;h:outputText value="#{ivy.cms.co('/#{data.sma}/dialog/lblInputtext')}" style="height: 300px; width:450px"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this line i eliminated the dynamic sma #{data.sma}.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;h:outputText value="#{ivy.cms.co('/sma25/dialog/lblInputtext')}" style="height: 300px; width:450px"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Neither of these lines work. They do compile but when I press on the link in the engine-browser i get the following exception still:&lt;/p&gt;
&lt;p&gt;HTTP Status 500 - javax.el.PropertyNotFoundException: Property 'co' not found on type ch.ivyteam.ivy.page.engine.jsp.JspCms&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;type Exception report&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;message javax.el.PropertyNotFoundException: Property 'co' not found on type ch.ivyteam.ivy.page.engine.jsp.JspCms

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: javax.el.PropertyNotFoundException: Property 'co' not found on type ch.ivyteam.ivy.page.engine.jsp.JspCms
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:229)
        org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
        ch.ivyteam.ivy.dialog.execution.jsf.controller.rest.IvyRestServiceFilter.doFilter(IvyRestServiceFilter.java:54)
        ch.ivyteam.ivy.dialog.execution.jsf.controller.IvyFacesInstanceFilter.filterAsSystem(IvyFacesInstanceFilter.java:104)
        ch.ivyteam.ivy.dialog.execution.jsf.controller.IvyFacesInstanceFilter.access$0(IvyFacesInstanceFilter.java:79)
        ch.ivyteam.ivy.dialog.execution.jsf.controller.IvyFacesInstanceFilter$1.call(IvyFacesInstanceFilter.java:55)
        ch.ivyteam.ivy.dialog.execution.jsf.controller.IvyFacesInstanceFilter$1.call(IvyFacesInstanceFilter.java:1)
        ch.ivyteam.ivy.security.internal.SecurityManager.executeAsSystem(SecurityManager.java:1425)
        ch.ivyteam.ivy.dialog.execution.jsf.controller.IvyFacesInstanceFilter.filter(IvyFacesInstanceFilter.java:49)
        ch.ivyteam.ivy.dialog.execution.jsf.controller.IvyFacesInstanceFilter.doFilter(IvyFacesInstanceFilter.java:37)
        com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:66)
        com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
        com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
&lt;/code&gt;&lt;/pre&gt;</description><atom:link href="https://answers.axonivy.com/questions/118/best-way-to-read-values-from-the-cms-in-a-jsf-dialog" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 25 Nov 2013 12:24:41 -0500</lastBuildDate><item><title>Answer by Nikel Weis</title><link>https://answers.axonivy.com/questions/118/best-way-to-read-values-from-the-cms-in-a-jsf-dialog/119</link><description>&lt;p&gt;Try:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;h:outputText value="#{ivy.cms.co('/your/folder/in/cms/yourLabel')}" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nikel Weis</dc:creator><pubDate>Mon, 25 Nov 2013 12:24:41 -0500</pubDate><guid>https://answers.axonivy.com/questions/118/best-way-to-read-values-from-the-cms-in-a-jsf-dialog/119</guid></item></channel></rss>