【问题标题】:How to define forms in JSF primefaces with pe:layoutPane如何使用 pe:layoutPane 在 JSF primefaces 中定义表单
【发布时间】:2014-12-16 14:39:28
【问题描述】:

我有一个带有 JSF 2 和 primefaces 和 primefaces 扩展 layoutPane 的模板布局。左侧有一个搜索区和一个结构区。右侧是细节区域。 这是模板的简短形式:

<html>
 <f:view contentType="text/html">
<h:head>
</h:head>
<h:body style="width: 100%; height: 100%;">
    <pe:layout id="layoutId">
        <pe:layoutPane id="layoutPaneWestId" position="west" size="30%" closable="false" resizeWhileDragging="true">

            <pe:layoutPane id="layoutPaneSearchId" position="north" closable="false" resizable="false">
                <h:form id="searchForm">
                    <ui:insert name="search" />
                </h:form>
            </pe:layoutPane>

            <pe:layoutPane id="layoutPaneContentId" position="center">
                <h:form id="structureForm">
                    <ui:insert name="content" />
                </h:form>
            </pe:layoutPane>

        </pe:layoutPane>

        <pe:layoutPane id="layoutPaneDetailId" position="center" size="70%" closable="false">
            <h:form id="detailsForm">
                <ui:insert name="details" />
            </h:form>
        </pe:layoutPane>

    </pe:layout>

</h:body>

每个区域都有自己的形式。现在我问自己,我该怎么处理 e。 G。全球 p: 咆哮。应该是什么形式?据我所知,嵌套表单是无效的 html。 另一个大问题是,当我在 searchForm 的搜索字段中键入内容并单击 structureForm 中的手风琴面板时,会提交搜索字段的内容。为什么?

亲切的问候 奥利

【问题讨论】:

    标签: forms jsf primefaces


    【解决方案1】:

    您应该将您的global p:growl 放在pe:layout 之外的另一种形式。

    第二个问题可能与从structureForm 调用到searchForm 的某些更新有关

    【讨论】:

    • 谢谢。我找到了。我提交了在搜索中输入的文本: 添加提交按钮后,它可以工作:
    猜你喜欢
    • 2012-05-02
    • 1970-01-01
    • 2011-08-08
    • 2023-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-24
    • 1970-01-01
    相关资源
    最近更新 更多