You can download sample application - AccessPropertyFile.zip, which shows how I'm accessing property file entries from Backing bean methods. There are two buttons on the application page and one text component. Entries in property file:
- firstAction=First action processed
- secondAction=Second action processed
When developing described functionality, at first I have declared message bundle in faces-config.xml:
- Open faces-config.xml in JDeveloper
- Select Overview tab
- Choose Application option
- Declare property file in Message Bundle field (e.g. lt.andrejusb.resources.UIResources)
Entries in property file are accessed using function from JSFUtils class - getStringFromBundle(param). This become possible, after declaring message bundle in faces-config.xml. JSFUtils class source comes with standard JDeveloper sample application - SRDemo.
0 comments:
Post a Comment