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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:01:44+00:00 2026-06-14T16:01:44+00:00

I have a modal dialog that contains some input components. The problem appears when

  • 0

I have a modal dialog that contains some input components.

The problem appears when a p:layout is used inside the dialog. The p:inputText component within a p:layoutUnit can gain focus at the first time, but then it become unresponsive to the keyboard, because no input text is showed, nor I’m able to switch to other input fields using the tab keyword (I can switch to another input component with the mouse only).

Setting modal=”false” solve the problem, but I need a modal dialog.

Here is my code:

<h:form id="outerForm">
    <p:commandButton id="button" value="Show dialog" onclick="dialogVar.show()" type="button" />

    <p:dialog id="dialog" header="inputText inside p:layout will not work" widgetVar="dialogVar" modal="true" resizable="false" closeOnEscape="true">

            <h:inputText />
            <p:autoComplete />

            <p:panelGrid columns="2">
                <h:outputLabel value="Write something" />
                <p:inputText />
                <h:outputLabel value="Write something else" />
                <p:inputText />
                <h:outputLabel value="Text Area" />
                <p:inputTextarea rows="4" cols="30" autoResize="false" />
            </p:panelGrid>

            <p:layout id="diffDialogLayout" style="height:400px;width:900px;">

                <p:layoutUnit id="diffWestUnit" position="west" size="45%">
                    <p:panelGrid columns="2">
                        <h:outputLabel value="Write something" />
                        <p:inputText />
                        <h:outputLabel value="Write something else" />
                        <p:inputText />
                        <h:outputLabel value="Text Area" />
                        <p:inputTextarea rows="4" cols="30" autoResize="false" />
                    </p:panelGrid>
                </p:layoutUnit>

                <p:layoutUnit id="diffCenterUnit" position="center">
                    <br />
                </p:layoutUnit>
            </p:layout>

            <h:inputText />

    </p:dialog>
</h:form>

My environment:

  • PrimeFaces 3.4.2
  • PrimeFaces Extensions 0.6.1
  • Mojarra 2.1.13
  • Tomcat 7.0.30
  • Eclipse Indigo SR1

Edit

The proposed solution works fine. The problem can be solved with the following CSS code:

.ui-dialog { z-index: 1005 !important; }
.ui-layout-pane-west { z-index: 1010 !important; }
.ui-layout-pane-center { z-index: 1010 !important; }

or, if you want it for a specific dialog only:

#outerForm\3A diffDialog.ui-dialog { z-index: 1005 !important; }
#outerForm\3A diffWestUnit.ui-layout-pane-west { z-index: 1010 !important; }
#outerForm\3A diffCenterUnit.ui-layout-pane-center { z-index: 1010 !important; }

The \3A character is used for compatibility with IE 6-8, as stated here: Handling a colon in an element ID in a CSS selector.

  • 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-14T16:01:46+00:00Added an answer on June 14, 2026 at 4:01 pm

    I can able to reproduce your problem, The source of this problem is the z-index:1003 which is automatically inserted when using modal=true attribute in primefaces <p:dialog>

    you can make a workaround using a small css hack

    css:

    .ui-layout-pane-west
    {
    z-index:1008 !important; /*any value higher than the modal dialog's z-index */
    }

    before using the above css i suggest you to check the z-index of modal panel and change the value accordingly.

    Edit

    Take a look at the following link Problem with p:layout inside of p:dialog at primefaces forum, Taking a closer look at the source of jQuery Layout and jQuery Dialog of which primefaces components are built, You can see that dialogLayout_settings = {
    zIndex: 0
    }
    modal dialog is initialized with z-index:0, hence i suggest you to set the z-index of <p:dialog> to some constant value, like

    .ui-dialog{z-index:1005 !important;}

    however test this with your other components to avoid overlaps.

    Hope this helps.

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

Sidebar

Related Questions

I have a modal dialog (jqueryui) that contains an accordion (jqueryui). The accordion is
I have an HTML link that opens a jQuery modal dialog which contains an
I have a modal dialog in Wicket that contains a link. I need to
I have a jQuery UI Dialog Box that contains a jQuery UI Autocomplete input
I have a jquery-ui-dialog that contains a <form> which contains a <input type=file >
i have a modal popup built with jquery UI ($.dialog) that contains an iframe
I have a modal dialog that is created with the following: procedure TFormCompose.createParams(var Params:
I have a jquery modal dialog that displays a partial view. The partial view
We have a requirement for a modal dialog that makes the page modal except
I have a modal dialog plugin written in jquery, that binds to the click

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.