首页 > 解决方案 > Primefaces中的对话框内可能有复合组件吗?

问题描述

是否可以在primefaces的对话框中包含复合组件?我已经完成了代码,但似乎复合组件无法像我希望实现的那样在对话框中呈现。当我触发显示对话框时,什么也没有出现。

对话:

<p:dialog id="editManageDealDialogId" styleClass="pf-dialog"
    responsive="true" closable="false" resizable="false" modal="true"
    widgetVar="editManageDealWidgetVar">
    <util:placement-deal id="newDPCompositeId"
        formHeader="Edit deposit placement"></util:placement-deal>
</p:dialog>

复合组件:

<!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://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:composite="http://java.sun.com/jsf/composite"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:pe="http://primefaces.org/ui/extensions"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:fn="http://java.sun.com/jsp/jstl/functions">
<h:head></h:head>

<composite:interface>
    <composite:attribute name="formHeader" type="java.lang.String" />
</composite:interface>

<composite:implementation>
    <div class="modal-body">
        <h:form id="form-modal" styleClass="my-form">
           <p:outputLabel value="Testing"></p:outputLabel>
        </h:form>
    </div>
</composite:implementation>
</html>

标签: jsfprimefacesdialogcomposite

解决方案


推荐阅读