Java Solutions

Showing posts with label resource. Show all posts
Showing posts with label resource. Show all posts

Tuesday, July 16, 2013

JSF Reference Card

Programmatically Accessing values from Resource Bundle

public class JSFUtil {
   [...]
 
   public String getResourceValue(String key,String parameters[]){
     FacesContext context = FacesContext.getCurrentInstance();
     ResourceBundle rb =context.getApplication().getResourceBundle(context,"resource_bundle_name");
     String value = rb.getValue("key")
     return MessageFormat.format(value,parameters);
   }
}

updating...

Posted by amer sohail at 12:19 AM 0 comments
Labels: bundle, jsf, MessageFormat, programmatically, resource
Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • Compiling and Executing Java program
    There are three basic steps in development of a simple java program which are Coding, Compiling, and Executing the java program. Coding is t...
  • Learning IOS Programming for Java Developers - Memory Management in Setters and Getters Of Object
    Encapsulation is one of the basic building block in Object Oriented paradigm. Encapsulation in Java is achieve by restricting user to direct...
  • JSF 2 Internals - Configurations
    In JSF 2, there is almost no need to mention any configuration in a small application and defaults values are sufficient enough to fulfill t...
  • Doing some work before showing Popup in ADF
    Here is the way to do any processing before calling popup. First of all create a method in backing bean and assign this to action of "c...
  • Inheritance Strategy - Class per hierarchy
    Hibernate supports several types of inheritance strategies in which simplest of them is "Class-per-heirarchy". In this strategy, d...

Blog Archive

  • ▼  2018 (1)
    • ▼  March (1)
      • How to Set Path for Java In Mac
  • ►  2014 (3)
    • ►  September (1)
    • ►  March (1)
    • ►  January (1)
  • ►  2013 (4)
    • ►  December (1)
    • ►  July (2)
    • ►  April (1)
  • ►  2012 (4)
    • ►  November (2)
    • ►  October (2)
  • ►  2011 (7)
    • ►  November (1)
    • ►  March (3)
    • ►  February (3)
  • ►  2010 (2)
    • ►  July (1)
    • ►  May (1)
  • ►  2009 (9)
    • ►  December (3)
    • ►  October (5)
    • ►  May (1)
  • ►  2008 (10)
    • ►  October (1)
    • ►  August (1)
    • ►  July (3)
    • ►  June (3)
    • ►  May (1)
    • ►  April (1)

Visitors

visitors by country counter
flag counter

Followers

Simple theme. Powered by Blogger.