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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:02:40+00:00 2026-06-10T13:02:40+00:00

So here is the opposite to the oft asked how to I render messages

  • 0

So here is the opposite to the oft asked “how to I render messages to more than one form”. I have two forms on one page, and after validation in one form, the summary error (if validation fails) shows up on both forms below the submit buttons. If the code succeeds in sending the required email the confirmation message also shows up in both forms. They should only show up in the form which was submitted. The message below the inputTexts work as they should. What am I doing wrong?

<p:panel>
    <h:form id="id_rememberUserNameForm" prependId="false">
                <td>
...
                    <p:inputText 
                        id="id_existingEmailAddress"
                        styleClass="registerinputtext width_20em"
                        size="20" 
                        maxlength="60" 
                        value="#{credentialsManagementBean.emailAddress}"
                        validator="#{multivalidator.validateEmailExists}" >
                        <f:ajax event="blur" render="id_noSuchEmailError" />
                    </p:inputText>
                </td>
            </tr>
            <!-- validation error handling +++++++++++++++++ -->
            <tr class="errorMessage min_height_1p5em">
                <td colspan="2" >
                    <h:message for="id_existingEmailAddress" 
                                id="id_noSuchEmailError" 
                                showDetail="false" 
                                showSummary="true"/>
                </td>
            </tr>
        </table>
        <p:commandButton id="id_remindUsernameButton" 
                            value="Retrieve Username" 
                            action="#{credentialsManagementBean.rememberUsername}" >
            <f:ajax execute="id_rememberUserNameForm" render="id_UserReminderMessage" />
        </p:commandButton>
        <p:messages id="id_UserReminderMessage" 
                            showSummary="false"
                            showDetail="true"
                            autoUpdate="true" />

    </h:form>
</p:panel>

<!-- next form +++++++++++++++++ -->

<p:panel>
    <h:form id="id_resetPasswordForm" prependId="false">
...
                    <p:inputText 
                        id="id_existingUsername"
                        styleClass="registerinputtext width_20em"
                        size="20" 
                        maxlength="20" 
                        value="#{credentialsManagementBean.username}"
                        validator="#{multivalidator.validateUsernameExists}">
                        <f:ajax event="blur" render="id_noSuchUserError" />
                    </p:inputText>
                </td>
            </tr>
            <!-- validation error handling +++++++++++++++++ -->
            <tr class="errorMessage min_height_1p5em">
                <td colspan="2" >
                    <h:message for="id_existingUsername" 
                                id="id_noSuchUserError" 
                                showDetail="true" 
                                showSummary="false"/>
                </td>
            </tr>
        </table>
        <p:commandButton id="id_resetPasswordButton" 
                            value="Retrieve Username" 
                            action="#{credentialsManagementBean.resetPassword}" >
            <f:ajax execute="id_resetPasswordForm" render="id_pwResetMessage" />
        </p:commandButton>
        <p:messages id="id_pwResetMessage" 
                            showSummary="true"
                            showDetail="false"
                            autoUpdate="true" />
    </h:form>
</p:panel>
  • 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-10T13:02:42+00:00Added an answer on June 10, 2026 at 1:02 pm

    Using an update on <p:commandButton> looks working. So try this:

    <p:commandButton id="id_remindUsernameButton" value="Retrieve Username" 
       action="#{credentialsManagementBean.rememberUsername}" update="id_UserReminderMessage" process="@form">
    </p:commandButton>
    

    as <p:commandButton> default is ajax submit, you do not need <f:ajax>

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

Sidebar

Related Questions

I think I have the opposite problem as described here . I have one
So here is what I'm doing exactly: I have a form with a caption
I have two divs which I need to show the opposite upon click. You
Here's what I have, but it seems kind of redundant. Maybe someone more experienced
Here are my two reg expressions. The first one seems to match my case
Or, what is the opposite of +(void)initialize? Here's my situation: I have a class
Here is the scenario: I have two radio buttons, 1) for a normal customers
I have been struggling with getting an opposite search in MySQL. Here is a
I try to achive the opposite of here . I have an abstract class,
Here is the Javascript I currently have <script type=text/javascript> $(function() { $('.slideshow').hover( function() {

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.