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 7517901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:35:55+00:00 2026-05-30T01:35:55+00:00

I am using PrimeFaces 2.1 to show a dialog like this: <p:dialog header=Test modal=true

  • 0

I am using PrimeFaces 2.1 to show a dialog like this:

<p:dialog header="Test" modal="true" showEffect="fade" hideEffect="fade" widgetVar="dlgTest" resizable="false" closable="false" width="500">
<!-- dialog content -->
</p:dialog> 

Everything is ok but I also want that the dialog can’t be closed (thats why I used “closable” false)

The problem is: when the dialog appears and the user press ESC, the dialog gets closed (skipping the closable property)

Any idea to solve this or is it a bug of Primefaces? I think closable property just remove the (X) from the dialog and has no sense!

Just to know: I tried to use jQuery and restrict the ESC key evaluating the keychar (27) in the interface but it has no effect when the dialog appears (it works just for the interface body)

Thanks!

  • 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-05-30T01:35:56+00:00Added an answer on May 30, 2026 at 1:35 am

    There is a closeOnEscape attribute for p:dialog which defaults to true.

    Try the following:

    <p:dialog header="Test" 
              modal="true" showEffect="fade" 
              hideEffect="fade" widgetVar="dlgTest" 
              resizable="false" closable="false" 
              closeOnEscape="false" width="500">
      <!-- dialog content -->
    </p:dialog> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a modal ConfirmDialog that is shown over a modal Dialog using PrimeFaces
I am using primefaces datatable to show some data and I would like to
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
i am using primefaces library this is my jsp page source: <%@taglib uri=http://primefaces.prime.com.tr/ui prefix=p%>
I'm using PrimeFaces 3.0 and JSF 2.0. In my webapp, I display a modal
I'm using Primefaces 3.0.RC1 and on a form I have a <p:fileUpload mode=advanced auto=true>
I'm using PrimeFaces p:growl. <p:growl id=msgsInfo rendered=true showDetail=true /> <p:growl id=msgsError globalOnly=true showDetail=true sticky=true
I am Using primefaces and Jsf with glassfish when i try to execute this
How can I launch a dialog according to some conditions? I am using primefaces
I'm using Primefaces 2.2.1 and JSF 2.0 and I'm trying to show a list

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.