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:
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
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.
In this line i eliminated the dynamic sma #{data.sma}.
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
asked 25.11.2013 at 11:50 Daniel Oechslin |
Try:
answered 25.11.2013 at 12:24 Nikel Weis worked perfectly! thx for the fast help!
(25.11.2013 at 13:22)
Daniel Oechslin
You're welcome. :)
(25.11.2013 at 13:22)
Nikel Weis
Dear Nikel Unfortunately your line: <h:outputtext value="#{ivy.cms.co('/your/folder/in/cms/yourLabel')}"/> Triggers the following exception: javax.servlet.ServletException: javax.el.PropertyNotFoundException: Property 'co' not found on type ch.ivyteam.ivy.page.engine.jsp.JspCms Do you have any other ideas how to Access the CMS from whitin JSF-Code? @Nikel regarding if I use a CMS-JSF page or a HTML-Page I am using a HTML-user-page.
(25.11.2013 at 14:35)
Daniel Oechslin
@Daniel: Something seems to be wrong here. This code should work (retested it). Did you try it in a "clean" projects environment? Did you recheck spelling? Because in your initial question you used a el-Expression as well. Otherwise I've to resign here. Sorry. Or provide full code example in your initial question.
(25.11.2013 at 14:46)
Nikel Weis
I did a full clean. And the spelling is correct. I added the code I use. But the Problem seems to be the method call. The method you use simply doesn't exist in the API in this context. :-(
(26.11.2013 at 13:59)
Daniel Oechslin
Have a look at the FormDemo in the HtmlDialogDemos it seems to work there like this: "<p:outputlabel value="#{ivy.cms.co('/ch.ivyteam.htmldialog.demo/FormDemo/Labels/Name')}" for="Name"/> "
(26.11.2013 at 14:52)
Peter Stöckli ♦
After some fiddling it worked.
I can't figure why it didn't work the whole time. In the end I changed nothing compared to the answer of Nikel. Thx to all who helped!
(26.11.2013 at 16:42)
Daniel Oechslin
showing 5 of 7
show 2 more comments
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 25.11.2013 at 11:50
Seen: 3,332 times
Last updated: 26.11.2013 at 16:54