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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:22:01+00:00 2026-05-17T17:22:01+00:00

I am running into a peculiar problem when I am trying to invoke h:inputText

  • 0

I am running into a peculiar problem when I am trying to invoke h:inputText label field value on validation. It only works when I pass a static value to label field. The time I pass a dynamic value to it, it fails to render the label when some validation fails for that field.

<h:inputText id="fullNameField" value="#{newUserFormBean.fullName}"
       **label="${nlsSupport.label_fullName}"** required="true" size="32"  styleClass="required">                        
               <f:validateLength minimum="3" maximum="64"/>
</h:inputText>

If the validation fails for Minimum length, the error message is displayed as:

no label rendered here: must be minimum 3 characters

But when I hard code the label instead of passing a dynamic value to it, it displays a valid validation message, with label name printed on screen.

<h:inputText id="fullNameField" value="#{newUserFormBean.fullName}"
      **label="Full Name"** required="true" size="32" styleClass="required">      
      <f:validateLength minimum="3" maximum="64"/>
     </h:inputText>

Now, if the validation fails for Minimum length, the error message is displayed as:

Full Name: must be minimum 3 characters

I have also looked at the JSF documentation, and it reads that the label accepts expression language expressions. So why is the dynamic value passed not rendering after failure validation?

Also, I need to pass the label dynamically (from Resource bundle), so as to add National Language Feature for different languages. This is the reason which forces me to pass a dynamic value to the label attribute instead of a static field.

Thanks.

  • 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-17T17:22:02+00:00Added an answer on May 17, 2026 at 5:22 pm

    Got the solution.

    I was loading the resource bundle in xhtml using

    <f:loadBundle basename="com.myproject.i18n.nls" var="nlsSupport" />,

    which would cause a problem loading the resource bundle field on Ajax validation. Now I modified it to be implement Ajax support

    <a4j:loadBundle basename="com.myproject.i18n.nls" var="nlsSupport" />

    and it works now.

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

Sidebar

Related Questions

I seem to be running into a peculiar problem on Android 1.5 when a
Running into a problem where on certain servers we get an error that the
Running into the strangest problem on iPhone using jQuery with my WebViewController. I have
Running into a problem. I have a table defined to hold the values of
We are running MS SQL 2005 and we have been experiencing a very peculiar
Running into strangeness with get_payload: it seems to crap out when it sees an
I'm running a java program on many computers that interact between them. After several
I have used response.redirect in classic ASP and ASP.NET webforms. However, with MVC 2.0,
For example, I've got a simple schema which imports another schema. The second schema
I have a grails project with some additional java source files under src/java folder.

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.