[opencms-dev] ${cms.enableReload} doesn't work
Antonio Cordeddu
antoniocordeddu at coranto.it
Fri Mar 31 10:08:45 CEST 2017
Hi Clement,
the right way to use "${cms.enableReload}" is as for the following
excerpt of code:
<c:if test="${cms.edited}">
<!-- enforce an automatical reload, when the content is edited
or moved to another container -->
${cms.enableReload}
</c:if>
Regards
Antonio
_______________________________________________
Coranto informatica di Antonio Cordeddu
antoniocordeddu at coranto.it
Skype: antonio.cordeddu
http://www.coranto.it
_______________________________________________
On 31/03/2017 05:44, Clement Wee wrote:
> Hi guys,
>
> I am using OpenCMS 10.5.1.
>
> ${cms.enableReload} isn't working for me.
>
> My formatter is this:
>
> <%@page buffer="none" session="false" trimDirectiveWhitespaces="true"%>
> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms"%>
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
> <cms:formatter var="content">
> ${cms.enableReload}
> <div class="margin-bottom-30" >
> <div id="chart-${cms.element.id <http://cms.element.id>}"></div>
> <script>
> Highcharts.chart("chart-${cms.element.id <http://cms.element.id>}", {
>
> title: {
> text: "${content.value.Title}"
> },
>
> subtitle: {
> text: 'Source: thesolarfoundation.com
> <http://thesolarfoundation.com>'
> },
>
> yAxis: {
> title: {
> text: 'Number of Employees'
> }
> },
> legend: {
> layout: 'vertical',
> align: 'right',
> verticalAlign: 'middle'
> },
>
> plotOptions: {
> series: {
> pointStart: 2010
> }
> },
>
> series: [{
> name: 'Installation',
> data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
> }, {
> name: 'Manufacturing',
> data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
> }, {
> name: 'Sales & Distribution',
> data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
> }, {
> name: 'Project Development',
> data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227]
> }, {
> name: 'Other',
> data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
> }]
>
> });
> </script>
> </div>
>
> My Schema has the single default field "Title" and my formatter config
> includes the HighCharts JS properly.
>
> The formatter has no other issue other than that it doesn't refresh
> after closing the editor view.
>
> Why might this be so? is ${cms.enableReload} placed in the wrong location?
>
> Regards,
> Clement
>
> P.S.: I asked this question before, but it didn't get any reply, so I
> am posting it again as I really need a solution to this.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170331/9ef66cc0/attachment.htm>
More information about the opencms-dev
mailing list