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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:01:43+00:00 2026-06-13T17:01:43+00:00

i have a form with inputs validation as follows: <h:form id=insurance-form rendered = #{(param[‘insSaved’]==’editable’)}>

  • 0

i have a form with inputs validation as follows:

<h:form id="insurance-form" rendered = "#{(param['insSaved']=='editable')}">
    <div id="insurance-info">
        <ul id="form-labels" style="text-align:left;">
            <li>Insurance Company&nbsp;</li>
            <li>Policy Number&nbsp;</li>
            <li>Coverage Amount&nbsp;</li>
            <li>Agent's Phone Number&nbsp;</li>
            <li>Agent's Email&nbsp;</li>
        </ul>

        <ul>
            <li>
                <h:inputText value="#{residenceBeans.insuranceCompany}" id="insurance-company" required="true" requiredMessage="company is required"/>
                <h:message for="insurance-company" styleClass="validation-error-msg insuarnce-validation"/>
            </li>

            <li>
                <h:inputText value="#{residenceBeans.policyNumber}" id="insurance-policy" required="true" requiredMessage="number is required"/>
                <h:message for="insurance-policy" styleClass="validation-error-msg insuarnce-validation"/>
            </li>

            <li>
                <h:inputText value="#{residenceBeans.coverageAmount}" id="insurance-amount" required="true" requiredMessage="coverage amount is required"/>
                <h:message for="insurance-amount" styleClass="validation-error-msg insuarnce-validation"/>
            </li>

            <li>
                <h:inputText value="#{residenceBeans.agentPhone}" id="insurance-phone" required="true" requiredMessage="phone is required"/>
                <h:message for="insurance-phone" styleClass="validation-error-msg  insuarnce-validation"/>
            </li>

            <li>
                <h:inputText value="#{residenceBeans.agentMail}" id="insurance-mail" required="true" requiredMessage="email is required">
                    <f:validator validatorId="emailValidator"/>
                </h:inputText>
                <h:message for="insurance-mail" styleClass="validation-error-msg insuarnce-validation"/>
            </li>
        </ul>                                       

        <h:commandLink value="SAVE POLICY INFORMATION" action="#{residenceBeans.saveInsuranceInfo}"  styleClass="insurance-link-container">
            <f:param name="insSaved" value="saved"/>
        </h:commandLink>
    </div>
</h:form>   

when leaving fields empty and submitting the form i am expecting the validation messages to be displayed, but instead i am getting the following warning:

21:20:47,671 INFO  [javax.enterprise.resource.webcontainer.jsf.renderkit] (http--127.0.0.1-8080-3) WARNING: FacesMessage(s) have been enqueued, but may not have been displayed
sourceId=insurance-form:insurance-company[severity=(ERROR 2), summary=(company is required), detail=(company is required)]
sourceId=insurance-form:insurance-policy[severity=(ERROR 2), summary=(number is required), detail=(number is required)]
sourceId=insurance-form:insurance-amount[severity=(ERROR 2), summary=(coverage amount is required), detail=(coverage amount is required)]
sourceId=insurance-form:insurance-phone[severity=(ERROR 2), summary=(phone is required), detail=(phone is required)]
sourceId=insurance-form:insurance-mail[severity=(ERROR 2), summary=(email is required), detail=(email is required)]

please advise how to fix that.

  • 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-13T17:01:44+00:00Added an answer on June 13, 2026 at 5:01 pm

    The messages are not been displayed because the whole form is not been rendered at all on postback. You instructed the form to be rendered only when the request parameter of insSaved has a value of editable. However, in the submit button it’s been changed to saved, so the form is basically never rendered on postback and the enclosed messages thus also not. This is fully expected behaviour given the way how the code is set up.

    If you’d like to show the form in case of a validation error on postback anyway, then you’d need to alter its rendered attribute accordingly. Replace

    <h:form id="insurance-form" rendered="#{(param['insSaved']=='editable')}">
    

    by

    <h:form id="insurance-form" rendered="#{(facesContext.postback and facesContext.validationFailed) or (param['insSaved'] == 'editable')}">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Jquery validation of form as follows: $(this.initVariables.formId).validate({ errorElement: div, errorPlacement: function(error,
i have a form with some inputs that have validation (required=true) and when i
I have a form with inputs, the Jquery makes a specific input (the url
I currently have a form with inputs and name attributes. I'm able to get
I have an AngularJS page with several form inputs. When the some of the
I have form build with yii framework. The first 2 inputs is first_name and
I have a form which has three inputs when the page loads -- 2
I have a form with 2 text inputs and 2 radio buttons, as below:
I have a form that takes the following inputs: Name: IBM Surface(in m^2): 9
I have a form in which can be a few lines of inputs the

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.