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

  • Home
  • SEARCH
  • 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 840279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:35:53+00:00 2026-05-15T05:35:53+00:00

I have a h:selectOneMenu thats filled with enum values, which works fine. The only

  • 0

I have a h:selectOneMenu thats filled with enum values, which works fine. The only problem is that i don’t know how to overwrite the standard JSF error message, when no valid value is selected. The error message is always bv:title: 'Choose' must be convertible to an enum from the enum that contains the constant 'Choose'.
Although i have specified requiredmessage and validatormessage (which works on InputText), only the standard JSF message is shown.

The snippet:

<h:selectOneMenu id="title" value="#{personBean.person.title}" required="true"
                  requiredMessage="ERROR"
                  validatorMessage="ERROR">
  <f:selectItem itemValue="Choose" />
  <f:selectItems value="#{personBean.titleOptions}" />
  <f:ajax event="blur" render="titleError" />
  <f:validateRequired/> 
</h:selectOneMenu> 
<h:message for="title" errorClass="invalid" id="titleError" />

How can i overwrite the standard validator message?
Or better – can i create a copy of the JSF messages.properties with customized error messages (don’t want to define all errors in my own messages.properties again)?

  • 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-15T05:35:54+00:00Added an answer on May 15, 2026 at 5:35 am

    This is not a “required” error message. This is a “converter” error message. This may appear when the currently selected item does not match the expected type nor any of the options in the list. The required message will only appear when the currently selected item is null.

    You’re using a string value as first item. This is not convertible to an enum. You need to set it as item label with a null item value.

    <f:selectItem itemLabel="Choose" itemValue="null" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have the follonwing selectOneMenu <h:selectOneMenu value=#{modelsController.selected.idBrands}> <f:selectItems value={brandsController.itemsAvailableSelectOne} /> </h:selectOneMenu> <br/> which
I want to have multiple <h:selectOneMenu> that are displayed by selection of main <h:selectOneMenu>
I have a situation where there is a selectOneMenu that has a value bound
I have a selectOneMenu that displays some different stuff categories: <h:selectOneMenu value=#{searchController.selectedCategory}> <f:selectItems value=#{searchController.formatedCategories()}
I have a SelectOneMenu driven by a List, each of which contains an object
I have a table with 2 selectOneMenu components. I would like that once a
I have a <h:selectOneMenu> that renders the value of the cardStatus from my object
i have a selectOneMenu with selectitems. if i use <f:selectItem itemValue=3 itemLabel=#{hrBundle['phoneType3']}/> it works
I have a JSF page on which I want to have a checkbox that,
I have an h:selectOneMenu and an a4j:commandButton , the latter of which reRenders a

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.