Questions Tagged With jsfhttps://answers.axonivy.com/tags/jsf/?type=rss&user=Daniel%20Oechslinquestions tagged <span class="tag">jsf</span>enTue, 26 Nov 2013 16:53:27 -0500Nested JSF ELhttps://answers.axonivy.com/questions/139/nested-jsf-el<p>Hi there! Another fun JSF related question.</p> <p><strong>I want a nested el:</strong> </p> <pre><code>&lt;ui:param name="sma" value="#{data.sma}/dialog/lblInputtext')}" /&gt; &lt;ui:param name="smalbl" value="#{sma}" /&gt; &lt;h:outputText value="#{smalbl}" style="height: 300px; width:450px"/&gt; </code></pre> <p>The <strong>output</strong> is the following:</p> <pre><code>#{ivy.cms.co('/sma25/dialog/lblInputtext')} </code></pre> <p>I want exactly this output evaluated by jsf. It doesn't work when I put the result in #{} one more time. JSF prints out a warning due to wrong syntax.</p> <p>Has anyone else tried to nest el's?</p> <p>thx for help!</p>Daniel OechslinTue, 26 Nov 2013 16:53:27 -0500https://answers.axonivy.com/questions/139/nested-jsf-eljsfBest way to read values from the CMS in a JSF dialoghttps://answers.axonivy.com/questions/118/best-way-to-read-values-from-the-cms-in-a-jsf-dialog<p>Hi there I wonder what is the best way to get a CMS value in a value-field of a JSF/HMTL dialog.</p> <p>My first Approach was: </p> <pre><code>&lt;h:outputText value="&lt;%=ivy.cms.co('/#{data.type}/dialog/infoText')%&gt;" &lt;/h:outputText&gt; </code></pre> <p>But this wont work due to the '&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 </p> <pre><code>&lt;h:outputText value="&lt;%=ivy.cms.co('/#{data.lblInfoText')%&gt;" &lt;/h:outputText&gt; </code></pre> <p>but this can't be the best solution. Does anyone knows the proper way to add CMS values in a jsf value-field?</p> <p>thx in advance!</p> <p>EDIT:</p> <p>This is the exact line I use in the code.</p> <pre><code>&lt;h:outputText value="#{ivy.cms.co('/#{data.sma}/dialog/lblInputtext')}" style="height: 300px; width:450px"/&gt; </code></pre> <p>In this line i eliminated the dynamic sma #{data.sma}.</p> <pre><code>&lt;h:outputText value="#{ivy.cms.co('/sma25/dialog/lblInputtext')}" style="height: 300px; width:450px"/&gt; </code></pre> <p>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:</p> <p>HTTP Status 500 - javax.el.PropertyNotFoundException: Property 'co' not found on type ch.ivyteam.ivy.page.engine.jsp.JspCms</p> <hr> <p>type Exception report</p> <pre><code>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) </code></pre>Daniel OechslinMon, 25 Nov 2013 11:50:06 -0500https://answers.axonivy.com/questions/118/best-way-to-read-values-from-the-cms-in-a-jsf-dialogjsf