[opencms-dev] ${cms.enableReload} doesn't work
Clement Wee
clement at elixirtech.com
Fri Mar 31 05:44:02 CEST 2017
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}"></div>
<script>
Highcharts.chart("chart-${cms.element.id}", {
title: {
text: "${content.value.Title}"
},
subtitle: {
text: 'Source: 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.
On Thu, Mar 30, 2017 at 6:00 PM, <opencms-dev-request at opencms.org> wrote:
> Send opencms-dev mailing list submissions to
> opencms-dev at opencms.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
> or, via email, send a message with subject or body 'help' to
> opencms-dev-request at opencms.org
>
> You can reach the person managing the list at
> opencms-dev-owner at opencms.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of opencms-dev digest..."
>
>
> Today's Topics:
>
> 1. Re: Invalid OpenCMS Widget Class Error (Antonio Cordeddu)
> 2. Writing my own editor change handler (mihai lacusteanu)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 29 Mar 2017 15:30:20 +0200
> From: Antonio Cordeddu <antoniocordeddu at coranto.it>
> To: The OpenCms mailing list <opencms-dev at opencms.org>
> Subject: Re: [opencms-dev] Invalid OpenCMS Widget Class Error
> Message-ID: <ef70081e-3654-8935-29c0-94a30bd6329f at coranto.it>
> Content-Type: text/plain; charset="windows-1252"; Format="flowed"
>
> Hi Clement,
>
> have you add the node "widget" in opencms-vfs.xml config file?
>
> For example: <widget class="org.opencms.widgets.CmsTypeComboWidget"
> alias="TypeComboWidget" />
>
> Regards
> Antonio
>
> _______________________________________________
> Coranto informatica di Antonio Cordeddu
> Via Torricelli, 9 09047 Selargius (CA) - Italy
> antoniocordeddu at coranto.it
> http://www.coranto.it
> _______________________________________________
>
>
>
>
> On 29/03/2017 11:21, Clement Wee wrote:
> > Hello!
> >
> > I just created an OpenCMS native widget following the instructions in
> > the documentation. All the export points are set up properly etc, but
> > I am getting the following error when I try to load a component using
> > that widget in the Site Editor.
> >
> > 29 Mar 2017 17:14:47,863 ERROR [ncms.loader.CmsResourceManager: 618]
> > Error in getAllowedContextMap,
> > schema=/system/modules/elixir.opencms/schemas/SampleCustomChart.xsd,
> > type=SampleCustomChart, Invalid custom widget class
> > "com.elixirtech.opencms.ChartEditor" for element "Chart" in content
> > definition
> > "opencms://system/modules/elixir.opencms/schemas/SampleCustomChart.xsd".
> >
> > The class com.elixirtech.opencms.ChartEditor exists in a jar in the
> > lib folder of the module, which is already exported, so I have no idea
> > why it can't export. Is it because the package name of the module and
> > the package name of the Widget Class is different?
> >
> > Regards,
> > Clement
> >
> >
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please
> visit
> > http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
> >
> >
> >
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.opencms.org/pipermail/opencms-dev/
> attachments/20170329/277e461d/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 29 Mar 2017 16:32:06 +0300
> From: mihai lacusteanu <mihailacusteanu at gmail.com>
> To: The OpenCms mailing list <opencms-dev at opencms.org>
> Subject: [opencms-dev] Writing my own editor change handler
> Message-ID:
> <CAHwLZpn5svWnc=XBGiW_+zQfvQVGe1HpWOxsna22E4zhtjFF+A@
> mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I need to implement my own change handler.
> But I don't know where to put the file.
>
> The class I need is just like the CmsEditorChangeHandlerProperty class
> with a few changes....so I created at first a file just
> like CmsEditorChangeHandlerProperty.java to test if it works but I don't
> know where should I put it
>
> Can somebody help me?
> Thank you!
>
> *The CmsEditorChangeHandlerProperty file:*
>
> http://documentation.opencms.org/javadoc/core/src-html/org/
> opencms/ade/contenteditor/CmsEditorChangeHandlerProperty.html#line.46
>
> *Doc:*
> http://documentation.opencms.org/opencms-documentation/
> content-in-opencms/defining-a-content-type/defining-the-
> contents-behavior/adjusting-the-contents-appearance-in-
> the-content-editor/dependent-editor-fields/index.html#writing_own_handlers
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.opencms.org/pipermail/opencms-dev/
> attachments/20170329/97fb27b4/attachment-0001.html>
>
> ------------------------------
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
> End of opencms-dev Digest, Vol 282, Issue 4
> *******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170331/efbac5f3/attachment.htm>
More information about the opencms-dev
mailing list