Posts tagged el jsf properties
Enriching EL evaluation in JSF applications – retrieve values from property files or system properties0
This article illustrates the use of a custom ELVariableResolver in JavaServer Faces applications. In this example, we extend the basic functionality of JSF EL resolution with the ability to evaluate any EL expresion – whether used for a managed (bean) property or somewhere in a JSF page – against properties in designated property files and the system properties defined for the JVM.
Note: it is easy to extend JSF using the Spring Framework with similar functionality – as I describe at length in this article: http://technology.amis.nl/blog/12306/leveraging-spring-beans-in-adf-faces-applications-and-using-the-spring-propertyplaceholderconfigurer-bean-to-dynamically-configure-bean-properties-from-external-files.
This article shows how the extensibility of the EL resolver mechanism in JSF can be leveraged and can serve as an example for other extensions – for example the ability to resolve EL expressions against MBeans (JMX), JNDI entries, a database table, and whatever else comes to mind.
The examples are shown using JDeveloper and ADF Faces – but are applicable to JSF in general.