【问题标题】:p:command to submit a form in overlaypanelp:command 在覆盖面板中提交表单
【发布时间】:2014-08-11 20:56:35
【问题描述】:

我正在尝试将 p:commandButton 放在 overlayPanel 中,以提交 h:form 的信息并重定向到另一个视图。所以,我使用按钮的属性动作来执行这个操作。我有一个与此视图关联的托管 bean,但从未达到用于此目的的函数。你能帮帮我吗?

代码如下:

advancedSearch-form.xhtml

      <h:form>
        <h:panelGrid width="100%">
            <h:column>
             ....

            </h:column>

             ....

            <p:commandButton value="Submit" action="#{searchForm.save}">

            </p:commandButton>

        </h:panelGrid>

在另一个 xhtml 中:

        <h:form>
            <div>
                ...
                <div class="menu-search">
                     <p:commandButton id="advancedSearch" icon="ui-icon-carat-1-s" styleClass="ui-search-button" type="button"/>
                        <p:overlayPanel id="advancedSearchPanel" styleClass="ui-advanced-search-overlay" for="advancedSearch" hideEffect="fade" my="right top" dynamic="true" dismissable="false">
                          <ui:include src="/search/advancedSearch-form.xhtml"/>                        
                        </p:overlayPanel>
                </div>
                ...
           </div>

【问题讨论】:

  • 请加代码,方便快速解答。

标签: jsf primefaces commandbutton


【解决方案1】:

查看了overlay的属性后,我通过删除overlaypanel的动态属性解决了这个问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-08-02
    • 1970-01-01
    • 2015-03-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多