Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Resource file parameter value  RSS feed

 
Swaroop Kunduru
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,



I have a entry in application.properties file

caption_bubble_value.title={0} is a caption for the element box

JSP File

<fmt:message key="caption_bubble_value.title" />

in the java file I am setting a parameter to session

request.getSession().setAttribute("replaceVal", "Value headline");

How can I get the text "Value headline is a caption for the element box" on the page?

The replacement should happen on an event.

Please help,

Thanks in advance.

Regards,

Swaroop Kunduru.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What event?
 
Swaroop Kunduru
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response,

The event is while navigating to next screen from Home page when a button click "ADD"

Regards,

Swaroop Kunduru.
Drawing.png
[Thumbnail for Drawing.png]
Attached is the description.
 
Stefan Evans
Bartender
Posts: 1836
10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You pass parameters to the fmt:message tag by having a fmt:param tag nested inside it.


The parameter gets evaluated when the message is output. You can't drive it directly from events.
You can of course have the event end up on this jsp page with the message tag, but the evaluation of the message is a by-product of that rather than directly caused by the "add" action.


 
Swaroop Kunduru
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is working as expected. Thanks for help.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!