Hopefully I haven't missed someone else reporting this issue, but I get the following JavaScript error:
Code: Select all
Error: $("script[src*=\"/javax.faces.resource/primefaces.js\"]").attr("src") is undefined
Source File: https://www.mysite.com/user/bob/test?_PORTLET_something_INSTANCE_zJ0p_javax.faces.resource=primefaces.js&_PORTLET_something_INSTANCE_zJ0p_ln=primefaces&p_p_cacheability=cacheLevelPage&p_p_col_count=3&p_p_col_id=column-2&p_p_col_pos=2&p_p_id=PORTLET_something_INSTANCE_zJ0p&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal&v=3.0.M4
Line: 1
What's also strange is the behavior changes depending on whether the portlet has other PrimeFaces portlets before or after it on the page (these other portlets do not have <p:editor>). If the portlet with <p:editor> is last, the editor box is displayed. If the portlet without <p:editor> appears after the <p:editor> portlet, the JavaScript error occurs and the editor box is not displayed.
Here is the code for the <p:editor> portlet (cut down, including leaving out the Facelets code):
Code: Select all
<h:form id="inviteForm">
<f:loadBundle basename="content.labels" var="labels"/>
<h:outputStylesheet library="css" name="portlet-override.css" />
<h:outputStylesheet library="css" name="invite-fields.css" />
<h:messages globalOnly="true" showDetail="true" showSummary="false" layout="table" />
<h:panelGroup >
<h:panelGroup styleClass="tabHeading" >
<h:outputText value="Testing." />
</h:panelGroup>
<div class="row" >
<h:panelGroup styleClass="label">
<h:outputLabel for="firstName" value="#{labels['firstName']}" styleClass="required" />
</h:panelGroup>
<h:panelGroup styleClass="field">
<p:inputText id="firstName" alt="#{labels['firstName']}" value="#{bean.firstName}" binding="#{bean.UIFirstName}" />
<h:message for="firstName" />
</h:panelGroup>
</div>
<div class="row" >
<h:panelGroup styleClass="label">
<h:outputLabel for="message" value="#{labels['message']}" />
</h:panelGroup>
<h:panelGroup styleClass="field">
<p:editor id="message" widgetVar="editor" styleClass="messageField" style="width:98%" required="false" rows="3" value="#{bean.message}" />
<h:message for="message" />
</h:panelGroup>
</div>
<div class="button-group">
<h:commandButton action="#{bean.doSend}" alt="#{labels['send']}" value="#{labels['send']}" />
</div>
</h:panelGroup>
</h:form>