Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8873873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:34:34+00:00 2026-06-14T18:34:34+00:00

I have got an issue with my confirmation dialog. It just does not close

  • 0

I have got an issue with my confirmation dialog. It just does not close after clicking the confirm-button. This only occurs, if my form is in a tab view. (Excatly the some code works fine, if my form is not in a tab view but only a panel or something like that.)

        <h:form id="timingTableForm">
            <p:dataTable var="item" value="#{requestBean.rmRequest.timingList}" id="timingDataTable" editable="true">
             // some dataTable 
            </p:dataTable>
            <p:confirmDialog closable="true" appendToBody="true" id="confirmDialog" message="#{msg.conf_deleteyesno}" header="#{msg.conf_header}" severity="alert" widgetVar="confirmation">  
                <p:commandButton id="confirm" value="#{msg.btn_yessure}" update="timingTableForm" oncomplete="confirmation.hide()" actionListener="#{requestBean.deleteTiming}" process="@this"/>  
                <p:commandButton id="decline" value="#{msg.btn_notyet}" onclick="confirmation.hide()" type="button" />   
            </p:confirmDialog>
        </h:form>

If I change “oncomplete” to “onclick” it works fine also, but I want the dialog to disapear not until the server side operation is finished.

When I push the confirm-button something strange happens within the resulting HTML:

<div id="mainTabView:timingTableForm:confirmDialog" class="ui-confirm-dialog ui-dialog ui-widget ui-widget-content ui-overlay-hidden ui-corner-all ui-shadow" style="width: auto; height: auto;">

<div id="mainTabView:timingTableForm:confirmDialog" class="ui-confirm-dialog ui-dialog ui-widget ui-widget-content ui-corner-all ui-shadow ui-overlay-visible" style="width: auto; height: auto; left: 994.5px; top: 186px; visibility: visible; z-index: 1006;">

A new div with the same ID as my confirm-dialog is rendered. The result is one hidden confirm diolog (as expected) but there is also a new dialog that is still visible.
If i push the confirm button again I have 2 hidden conform dialogs and 1 visible dialog and so on…

Am I doing something wrong? Can you spot any error? Or could this be a bug in primefaces?

  • Primefaces 3.4.1
  • Running on GlassFish 3.1.2
  • Browser Firefox 16.0.2

Thank you in advance,
Fant


Actually i found a solution for my problem:

The problem only occurs, if I try to update the whole form which also contains the confirm dialog. If I only update some specific areas in this form, it works fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:34:36+00:00Added an answer on June 14, 2026 at 6:34 pm

    A dialog should not be placed inside any form, but be placed outside any form and have its own form.

    <h:form id="timingTableForm">
        <p:dataTable var="item" value="#{requestBean.rmRequest.timingList}" id="timingDataTable" editable="true">
         // some dataTable 
        </p:dataTable>
    </h:form>
    
    <p:confirmDialog closable="true" appendToBody="true" id="confirmDialog" message="#{msg.conf_deleteyesno}" header="#{msg.conf_header}" severity="alert" widgetVar="confirmation">  
        <h:form>
            <p:commandButton id="confirm" value="#{msg.btn_yessure}" update="timingTableForm" oncomplete="confirmation.hide()" actionListener="#{requestBean.deleteTiming}" process="@this"/>  
            <p:commandButton id="decline" value="#{msg.btn_notyet}" onclick="confirmation.hide()" type="button" />   
        </h:form>
    </p:confirmDialog>
    

    This because the HTML representation of the dialog may in the real HTML DOM tree be moved outside the current form (as you explicitly did by appendToBody="true"), which may cause “wtf” behaviour during asynchronous requests and updates, as you’re experiencing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey, I got kind of a weird issue here. I have an iPhone-only OpenGL
I have got an issue after updation in UpdatePanel. The issue is the jquery
I have a got an issue on SQL Server Database as it is not
i have got a unique issue, i had put this script on body onload
I have got stuck in a dump issue but am not able to work
I have an issue regarding link button, On my website i have got a
Ok so this is kind of a strange issue, but I have got two
I have got some markup that looks like this: <div class=button> <span class=image></span> <input
I have got one weird issue. I am working on an asp .net mvc
I have got the following issue, my function appends code to a string $string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.