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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:26:35+00:00 2026-05-19T22:26:35+00:00

I have a (JSF 2.0/ Primefaces 2.2RC-SNAPSHOT) app that has <p:layout> I use a

  • 0

I have a (JSF 2.0/ Primefaces 2.2RC-SNAPSHOT) app that has

 <p:layout> 

I use a lot of dialog in my application and before the newest version of primefaces came out there was no way to display a dialog with a modal on top of the layout without putting the dialogs outside of the tags.

So I did just that. The issue I am having now is I am noticing that constructors and postcontructs are being called when my application is loaded. This is because the view with the layout is being loaded and therefore all my dialogs are being loaded.

I don’t want these constructors being called until I am actually dealing with the appropriate views in my application.

I have been testing the appendToBody attribute on the

 <p:dialog> 

tag but it seems really buggy. Everything works fine on the initial rendering of a view. I can open a dialog close it etc and it works fine. If I navigate away to another view and then come back to the initial view and open the dialog, everything is running off the page. The dialog window is in the correct place but the content is not.

My question is 1. Is there a way I can have the dialog windows outside of my layout as a child of the

 <h:body>

without having all the managed bean constructors associated with them initiated when the application loads?

Or does anyone know how to fix the alignment issue when using the appendToBody tag? 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-19T22:26:35+00:00Added an answer on May 19, 2026 at 10:26 pm

    When using layout and dialog, I usually place my dialogs outside of the layout as a direct child of the body element. I have a special ui:insert part in my page template for this.

    appendToBody was added to make this easier, if it doesn’t work well for you, give this approach a try. I know modal dialogs and layout can work this way.

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

Sidebar

Related Questions

I have a JSF 2.0 page that uses Primefaces p:dialog component. The user can
I have a simple JSF line chart that uses PrimeFaces (via jqPlot) library: <p:lineChart
I have a JSF application that uses mostly Richfaces. I would like to introduce
I use Primefaces 3.1, JSF 2.1.6 on Glassfish 3.1.1. I have loads of commandbuttons
I have a JSF page that has a h:form that has some textfields and
I'm building a web-application using JSF/Primefaces. I need to have a constants-class, i.e. a
I have web application in which I am using JSF + Primefaces for UI.
Can I use jsf component libraries(primefaces) with spring mvc .I have problem with client
I have a PrimeFaces checkbox on a JSF page that I'd like to check/uncheck
I'm using JSF 2 and PrimeFaces 2.1 on GlassFish. I have a page that

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.