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

  • SEARCH
  • Home
  • 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 8620395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:34:12+00:00 2026-06-12T06:34:12+00:00

in my page , i’m trying to display a confirmation dialog after clicking a

  • 0

in my page , i’m trying to display a confirmation dialog after clicking a button .In the confirmation dialog i used the attribute message to display it , this message is taken value after clicking the button . So i did it like that :

 <p:commandButton value="Delete" update="testPlanetree" id="deleteBtn" 
   disabled="#{projectTestManagementMB.disable}" oncomplete="deleteConfirmation.show()"
    action="#{projectTestManagementMB.testFn}"/>


 <p:confirmDialog id="confirmDialog" message="# 
  {projectTestManagementMB.deleteConfirmationMsg}"  
    header="Confirming Deleting Process" severity="alert" 
   widgetVar="deleteConfirmation">  

    <p:commandButton id="confirm" value="Yes Sure" update="messages"   
     oncomplete="deleteConfirmation.hide()"    />  

      <p:commandButton id="decline" value="Not Yet" 
       onclick="deleteConfirmation.hide()" type="button" />   

     </p:confirmDialog> 

ProjectTestManagementMB Managed Bean :

    private String deleteConfirmationMsg;//with getters and setters 
    public void testFn(){
       deleteConfirmationMsg="do you want to delete ...";
    }

The problem is that the deleteConfirmationMsg never take the value “do you want to delete …” (is always empty)

Any idea will be appreciated

  • 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-12T06:34:13+00:00Added an answer on June 12, 2026 at 6:34 am

    The <p:confirmDialog> has already generated its HTML representation on the very first HTTP request returning the page with the form and the dialog. It’s merely hidden by CSS and is supposed to be shown/hidden by JS. When you change the confirm message afterwards in a bean action method, then it won’t be reflected in the generated HTML output as long as you don’t ajax-update it.

    So, in order to get the changed message being reflected, you’d need to update the HTML representation of the <p:confirmDialog> in the client side before showing it in the oncomplete. You can for this use the update attribute of the command button which should show the dialog.

    <p:commandButton ... update="confirmDialog testPlanetree">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Page link I am working on is http://www.whatcar.com/car-news/subaru-xv-review/260397 I am trying to automate 'clicking
The page I'm trying to load is something like this (although, the number of
Page of the application with the TextBlock and Button, also involved .txt document with
Page A has a meta refresh to redirect to another page, C , after
The page is here: https://gentle-day-3026.herokuapp.com/ The css file like this: https://gentle-day-3026.herokuapp.com/stylesheets/base.css another is to
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
page = 1; $('.links').click(function() { $(this).removeAttr('href'); page = $(this).html(); }); <a href=# class=links> 1
Page 120 of Programming Pearls 1st edition presents this algorithm for selecting M equally
page.getByXPath(//*[@href='http://www.example.com/index.do/abc/1_*'); Do I need to escape any characters? I am trying to get all

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.