aspose file tools*
The moose likes JSF and the fly likes How to pass dynamic value to resource bundle param like {0} Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "How to pass dynamic value to resource bundle param like {0}" Watch "How to pass dynamic value to resource bundle param like {0}" New topic
Author

How to pass dynamic value to resource bundle param like {0}

Ajay Kamble
Ranch Hand

Joined: Jan 23, 2009
Posts: 51
Hello All,

I have below message in my resource bundle,



I have kept href as param {0}, because I do not want to hard code it. I want to make the dynamic URL using context path etc.,

I tried below and it failed because of this error: JSPG0124E: Custom tag attribute value cannot be runtime expression



How do I code this now? Is there any trick to get this done in JSF?

-Regards
Ajay
Shasi Mitra
Ranch Hand

Joined: Nov 27, 2008
Posts: 101

Jsf page

<hutputFormat value="#{bundle.someText}">
<f:param value="#{backingBean.startTime}"/>
<f:param value="#{backingBean.endTime}"/>
</hutputFormat>

Properties File

someText=You can call me on business days between the hours of {0} and {1} Eastern Time.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to pass dynamic value to resource bundle param like {0}
 
Similar Threads
language propertis to xml properties
How to apply styles for particular string in Message ResourceBundle
Problem with reading of var from faces-config.
Export to Excel in JSF 1.2
How to display a message resource value using an argument via <h:outputText>