I came across an issue on one of my pages where I was using pe:cKEditor within a prime:tabView where I could effectively screw up the initialisation of the editor depending on the order in which I clicked buttons.
I've condensed my larger example down to the following snippet to eliminate a lot of other issues:
Code: Select all
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:prime="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<h:head>
</h:head>
<h:body>
<h:form id="contentForm">
<prime:tabView>
<prime:tab title="Tab 1">
<prime:outputLabel value="FLD PAGE 1"></prime:outputLabel>
<prime:inputText value="#{testBean.field1}" size="50"/>
</prime:tab>
<prime:tab title="Tab 2">
<prime:outputLabel value="FLD PAGE 2"></prime:outputLabel>
<pe:ckEditor value="#{testBean.field2}"/>
</prime:tab>
</prime:tabView>
<h:panelGroup style="float:right">
<prime:commandButton value="An Action" action="#{testBean.doAction}" update=":contentForm"/>
</h:panelGroup>
</h:form>
</h:body>
</html>
Uncaught TypeError: Cannot read property 'hasAttribute' of undefined
I initially assumed it would be an issue with the primefaces extensions / ckEditor resources as there seems to be some historical errors reported with the editor when it tries to destroy / initialise itself. See http://dev.ckeditor.com/ticket/11924 and http://stackoverflow.com/questions/1932 ... -in-emberj but by chance I jumped back to version 5.1.2 of primefaces and found I didn't have the same issue. I went up versions one by one until it started breaking and the issues start in version 5.1.5
Whilst I am sure I can do some working around, restructuring the page in question (which is obviously far more complicated than the example above), I wonder if anyone else is experiencing this, and why it might have just started occurring since version 5.1.5