Best way to read values from the CMS in a JSF dialog
Hi there
I wonder what is the best way to get a CMS value in a value-field of a JSF/HMTL dialog.
My first Approach was:
<h:outputText value="<%=ivy.cms.co('/#{data.type}/dialog/infoText')%>" </h:outputText>
But this wont work due to the '<' 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
<h:outputText value="<%=ivy.cms.co('/#{data.lblInfoText')%>" </h:outputText>
but this can't be the best solution. Does anyone knows the proper way to add CMS values in a jsf value-field?
thx in advance!
EDIT:
This is the exact line I use in the code.
<h:outputText value="#{ivy.cms.co('/#{data.sma}/dialog/lblInputtext')}" style="height: 300px; width:450px"/>
In this line i eliminated the dynamic sma #{data.sma}.
<h:outputText value="#{ivy.cms.co('/sma25/dialog/lblInputtext')}" style="height: 300px; width:450px"/>
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:
HTTP Status 500 - javax.el.PropertyNotFoundException: Property 'co' not found on type ch.ivyteam.ivy.page.engine.jsp.JspCms
--------------------------------------------------------------------------------
type Exception report
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)