我正在尝试将 PF Extension CKEditor 放在像 Accordion 这样的结构中,除非选中,否则它是隐藏的。将其放入手风琴或模式不起作用,因为编辑器未正确呈现,而仅呈现没有任何控件等的文本区域。下面的代码显示了使用模式的尝试。我还尝试将编辑器直接放在手风琴面板中,但结果相同。有没有可能将编辑器放在这个或类似的结构中?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:b="http://bootsfaces.net/ui"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:pe="http://primefaces.org/ui/extensions">
<ui:composition template="../WEB-INF/templates/template-main.xhtml" >
<ui:define name="content">
<b:row rendered="#{Login.user.team.project != null}">
<b:column span="3">
<b:panel id="doc-panel" look="primary" title="Dokumente" collapsible="false">
<b:listLinks>
<c:forEach items="#{ProjectBacking.documents}" var="document">
<b:navLink value="#{document.documentName}" update="currentChapters"
>
<f:ajax listener="#{ProjectBacking.setCurrentDocumentAndChapters(document.documentName)}"
render="currentChapters" execute="@this"/>
</b:navLink>
</c:forEach>
</b:listLinks>
</b:panel>
</b:column>
<b:column span="9" id="currentChapters">
<b:accordion>
<c:forEach items="#{ProjectBacking.currentChapters}" var="chapter">
<b:panel id="panel-#{chapter.chapterOrder}" title="#{chapter.chapterOrder}. #{chapter.chapterName}" collapsible="true" collapsed="true">
<b:row rendered="#{ProjectBacking.testContent == null or ProjectBacking.testContent.equals('')}">
<b:column span="12">
<h:outputText value="Sie haben haben für dieses Kapitel bisher keine Inhalte erstellt." />
</b:column>
<b:column span="4" />
<b:column span="4">
<b:button value="Inhalte Erstellen"
look="success"
styleClass="full-width"
onclick="$('.modal-edit-content').modal();return false;"/>
</b:column>
<b:column span="4"/>
</b:row>
</b:panel>
</c:forEach>
</b:accordion>
</b:column>
</b:row>
<b:modal class="modal-edit-content">
<b:row>
<b:column span="12">
<h:form>
<pe:ckEditor
value="#{ProjectBacking.testContent}">
<p:ajax event="save" listener="#{ProjectBacking.testMethod}" update="currentChapters" />
</pe:ckEditor>
</h:form>
</b:column>
</b:row>
</b:modal>
</ui:define>
</ui:composition>
</html>