Consider the following class DialgBean.java, which defines the properties of a dialog box on a web page. Below is the class and its bean definition
public class DialogBean{
private int height;
public void setHeight(int height)
...
}
<bean id="dialogBean" class="org.springhelp.DialogBean">
<property name="height" value="${dialogBean.height}"/>
...
</bean>
From the above example you can see that the DialogBean's height property is being fetched by a PropertyPlaceholderConfigurer.
The problem is that the application I am working on supports multiple clients, and most clients have separate requirements for the height parameter of a dialog box. Therefore, I can not simply pull the height parameter from one properties file.
So, how do I inject a client specific height parameter into a DialogBean using the bean definition described above, where the client id is stored as the variant in the java.util.Locale object?
Is there a way to pass to a custom bean factory post processor run time data like the Locale?