Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

JSF Resource bundle Problem

  Asked By: Ibthaj    Date: Feb 09    Category: Java    Views: 1293
  

We are using below Ant file to convert our native messages to unicode ones. Use it to produce a unicode-based resource bundle corresponding to your primary bundle. For detail info about this task see this page: ant.apache.org/.../native2ascii.html

build_convert.xml:


<project name="converter" basedir="." default="def">

<target name="def">

<native2ascii encoding="UTF-8" ext="_unicode.properties" dest=".">

<filename name="Application_fa.properties"/>


</native2ascii>
</target>

</project>

Running this ant, will produces a unicode file with the name of the original one (Application_fa.properties) augmented with _unicode (Application_fa_unicode.properties).


Then in your JSF pages use f:loadBundle tag like below:
<f:loadBundle basename="Application_fa_unicode" var="bundle" />

Now, you can access your messages in other tag using EL:
<h:outputLabel value="#{bundle['message1']}"/>

By following these steps, your problem will be solved.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Samuel Costa     Answered On: Feb 09

I hve this problem, too!
plz let me know how to use message bundle  in jsf  without any problem  .

 
Didn't find what you were looking for? Find more on JSF Resource bundle Problem Or get search suggestion and latest updates.




Tagged: