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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:14:14+00:00 2026-06-13T11:14:14+00:00

I am working with 4-5 primefaces dialogboxes. When click ESC i want close all

  • 0

I am working with 4-5 primefaces dialogboxes. When click ESC i want close all dialogboxes which are opened.

  • 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-13T11:14:15+00:00Added an answer on June 13, 2026 at 11:14 am

    Call the dialog’s hide() function through the client side object specified with widgetVar. So if you defined your p:dialog like:

    <p:dialog widgetVar="dialog1" header="Dialog 1"/>
    <p:dialog widgetVar="dialog2" header="Dialog 2"/>
    

    Your ESC button should look like:

    <p:commandButton value="ESC" onclick="dialog1.hide();dialog2.hide()"/>
    

    You can also create a reusable p:remoteCommand to close all your dialog and use that in your p:commandButton or in p:hotkey – if by “click ESCAPE” you mean hittig the Escape button:

    <p:remoteCommand name="closeAll" onsuccess="dialog1.hide();dialog2.hide()"/>
    

    then in your components refer to the closeAll() command:

    <p:hotkey bind="esc" handler="closeAll()"/>
    <p:commandButton value="ESC" onclick="closeAll()"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using jsf2.0 with primefaces.My application was working fine with all browsers includes
I am working with JSF 2.0 and primefaces 3.3. I want to hide/show a
I am working in primefaces 3.3 and jsf 2.0. I have problem in deleting
I am working with MyFaces/Primefaces and I have a problem to get information using
Working with JSF 2.0 (and Primefaces), is there a way to fire an ActionListener
I'm using JSF templates and Primefaces. Javascript code does not seem to be working
I'm working with JSF and PrimeFaces and I am using Facelets as view technology.
I want to display some data through primefaces datalist component. To achieve this I
I'm working with Primefaces.My functionality is to display the records in a datatable with
I'm working on the example mentioned in primefaces showcase . I am trying to

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.