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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:43:50+00:00 2026-05-18T00:43:50+00:00

I am using JSF 1.2 and Richfaces 3.3.FINAL. I have an inputText which must

  • 0

I am using JSF 1.2 and Richfaces 3.3.FINAL. I have an inputText which must be a number between 1 and 999999999999.

<h:inputText id="prodId" required="true" value="#{product.productId}" maxlength="12" >
    <f:validator validatorId="anotherValidatorValidator" />
    <f:validateLongRange minimum="1" maximum="999999999999"/>
</h:inputText>

I want my validation message to basically say that the user must enter a number between 1 and 99…9. In case I enter the number -1 and submit the form, this is the message that appears, which is what I want.

If however I write letters in the field, say ‘abcd’ i get :

prodId: ‘abcd’ must be a number between -9223372036854775808 to 9223372036854775807 Example: 98765432

This message is confusing for the users because, if the suggested negative numbers are submitted, the other validateLongRange validator will throw a message, now asking for numbers between the correct range.

The second message occurs because a ConverterException is thrown when the submittes String is cast to a Long (which is the type of the backing bean property) and the message javax.faces.component.UIInput.CONVERSION_MESSAGE_ID appears.

Can I somehow override it (not for all ConverterException cases, just the specific one), or make the message of the other validateLongRange appear?

  • 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-18T00:43:50+00:00Added an answer on May 18, 2026 at 12:43 am

    That message is actually coming from javax.faces.converter.LongConverter.LONG_detail and would only appear when you’ve configured h:message(s) with showSummary="false" and showDetail="true". The default (summary) message is would otherwise have been javax.faces.converter.LongConverter.LONG which is {2}: ''{0}'' must be a number consisting of one or more digits. which in turn makes more sense.

    If changing the message detail display is also not what you’re after and you really want to have the converter to display exactly the same message as the LongRangeValidator, then your best bet is to supply a custom converter which displays the desired message. You however have to hardcode the message yourself since JSF doesn’t support any API facilities to grab the default message message template.

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

Sidebar

Related Questions

I'd like to be able to make an Ajax call using JSF/Seam/RichFaces and have
I have an enterprise application written in JAVA with JSF (using RichFaces 3.3). Currently
Using jsf 1.2, hibernate, richfaces 3.3.0GA and facelets. I have this code in my
In JSF application we are using richfaces (Final.3.3.3). In pom.xml there is dependency on
I want to perform the following task using JSF / Richfaces On click of
I'm making a website Using JSF and richfaces, but I need to do some
I'm using Richfaces JSF and I want to iterate over an Map<Object,Object> . I
I am using JSF 2.0 btw I have an attribute X type Integer, that
I am using JSF along with RichFaces and Spring Webflow. I am trying to
I am currently using JSF 2.0 and Richfaces 3.3.3 and it's working fine. Now

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.