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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:14:27+00:00 2026-05-14T18:14:27+00:00

I need to have resource messages that contain EL expressions be resolved when loaded

  • 0

I need to have resource messages that contain EL expressions be resolved when loaded from a ResourceBundle. Basically I have a number of properties files containing the text. Some of the text will look like the following:

welcomeText=Welcome #{userbean.name}

The only possible way I can see this working currently is implementing a custom taglib so that instead of saying:

<f:loadBundle var="messages" basename="application.messages"/>

I would have to use

<mytaglib:loadBundle var="messages" basename="application.messages"/>
#{messages.welcomeText}

Given a user with username “User1”, this should output

Welcome User1

My implementation would then use a custom ResourceBundle class that would override handleGetObject, use the ELResolver to resolve variables etc….Ideas? suggestings? Implementations that are already available?

I appreciate your assistance.

  • 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-14T18:14:27+00:00Added an answer on May 14, 2026 at 6:14 pm

    Rather make use of <h:outputFormat> and <f:param> to display parameterized text. It’s backed by the MessageFormat API, the same rules as described in the API’s javadoc will be applied.

    E.g.

    welcomeText=Welcome {0}
    

    with

    <h:outputFormat value="#{messages.welcomeText}">
        <f:param value="#{userbean.name}" />
    </h:outputFormat>
    

    There it is for 🙂

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

Sidebar

Related Questions

I have a case where I need to load bitmap from a resource dll
I have a class with lots of string properties that need validated. I'm using
I have resource bundle as Java class that read values from database. When i
I have a requirement that I need to send an xml from the restclient
I need to know because I have to explicitly close some remote resources that
I have an image that I have in my bundle resources that I need
I have need to return multiple results from a subquery and have been unable
I have need for a function pointer that takes two arguments and returns a
I need to have custom checkboxes which wasn't that tricky. I made checkbox_selector to
Is there a way to have a parmeterized string in resource bundle? I need

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.