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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:59:35+00:00 2026-05-23T04:59:35+00:00

When the below dialog is opened and the user hits enter it closes. I’m

  • 0

When the below dialog is opened and the user hits enter it closes. I’m assuming that I need to somehow add some attribute to the below commandButton to not allow it to submit when the user hits enter. Any idea?

<p:dialog header="#{bundle['dreamSearch.HEADER']}"
        widgetVar="webSearchDlg" modal="true" styleClass="dialog dialog2"
        draggable="false" resizable="false" showEffect="fade"
        hideEffect="fade">
        <h:form id="dreamWebSearchFrm">
        <div class="dialog-top-reg"></div>
        <div class="dialog-middle-reg">
        <div><p:commandButton styleClass="close zoom3" onclick="webSearchDlg.hide()" /></div>
            <div class="dialog-content dialog-content2">
                <h1 class="dream-search">
                    <h:outputText value="#{bundle['dreamSearch.HEADER']}" />
                </h1>
                <p class="dream-search">
                    <h:outputText value="#{bundle['dreamSearch.SUBHEADER']}" />
                </p>
                <p:panel id="searchTextPnl">
                    <div class="dream-search-wrap">
                        <fieldset>
                            <p:inputText id="searchText" value="#{dreamSearchBean.searchText}"/>
                            <p:commandButton tabindex="-1" styleClass="form-btn1" value="#{bundle['dreamSearch.search.button.TEXT']}" 
                            actionListener="#{dreamSearch.search}" update=":dreamWebSearchFrm:resultsPnl"/>
                        </fieldset>
                    </div>
                </p:panel>
                <p:panel id="resultsPnl">
                    <div class="data-grid-wrap">
                    <h:outputFormat escape="false" value="#{bundle['dreamSearch.imageResults.TEXT']}" rendered="#{dreamSearchBean.shouldRender}">
                        <f:param value="#{dreamSearchBean.searchText}" />
                    </h:outputFormat>
                        <p:dataGrid var="dream" value="#{dreamSearchBean.dreams}" rendered="#{dreamSearchBean.shouldRender}" columns="5"
                            rows="10" paginator="true" effect="true"
                            styleClass="ui-header-visibility"
                            paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                            rowsPerPageTemplate="10,15,20" paginatorPosition="bottom">
                            <p:column>
                                <h:panelGrid columns="1" style="width:100%">
                                    <p:commandLink onclick="webSearchDlg.hide();dreamEditDlg.show();" update=":dreamEditFrm:display"> 
                                        <f:setPropertyActionListener value="#{dream}" target="#{dreamModifyBean.selectedDream}"/>
                                        <f:setPropertyActionListener value="false" target="#{dreamModifyBean.editLink}"/>
                                        <p:graphicImage value="#{dream.imageThumb}" width="100" height="100" />
                                    </p:commandLink>
                                </h:panelGrid>
                            </p:column>
                        </p:dataGrid>
                    </div>
                </p:panel>
            </div>
        </div>
        <div class="dialog-bottom-reg"></div>
    </h:form>   
    </p:dialog>
  • 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-23T04:59:37+00:00Added an answer on May 23, 2026 at 4:59 am

    In order to solve this, I had to ensure that the close button was the very last button within the form.

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

Sidebar

Related Questions

I have a dialog which performs some validation (below). Thee problem is, the dialog
I have an app which uses the user's location. I have a dialog(pic below)
Below is code for a dojo Dialog that will pop up to enable the
I have the below code for my a Dialog box for a which contains
I have a dialog box, created with the code javascript and HTML generated below.
Okay, so I've got the following code shown below to create a dialog using
below is my code for confirmation dialog and sending data with ajax. In this
In the below code, I get the two dialog boxes, but the bgColor of
I basically have a QMainWindow, and a Dialog window whose constructor is shown below;
I have the link below that executes the action message/new which shows a form

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.