Adding valuelists via ValueListProviderService

Hi Community,

Since the “valueListProvider” is deprecated in @DropdownList and in order to make use of valueListProviderKey I am trying to inject a ValueList into customValueListProviders via ValueListProviderService as explained in the doc

However, when the execution reaches the constructor of ValueListProviderServiceImpl, the map customProviders remains empty.

Please see below the XML snippet and ValueListProvider code that I am using. This file is located at META-INF/hst-assembly/overrides/addon/org/hippoecm/hst/platform/valuelistproviders.xml in the site project of a Bloomreach 14.7.4 archetype project.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""

    <bean id="customValueListProviders" class="org.springframework.beans.factory.config.MapFactoryBean">
        <property name="targetMapClass">
        <property name="sourceMap">
                <entry key="color-themes" value="org.example.beans.TestProvider" />

public class TestProvider implements ValueListProvider {
    List<String> values = Arrays.asList("test1", "test2", "test3");
    public List<String> getValues() {
        return values;

    public String getDisplayValue(final String value) {
        return getDisplayValue(value, null);

    public String getDisplayValue(final String value, final Locale locale) {
        return value;

Thanks in advance.

Kind Regards
Mehul Parmar

1 Like


I have run into this issue myself, but unfortunately I do not have a solution for you. For now please use the deprecated method, though it is expected to be removed in some future release. We are investigating this issue.

Hi Jasper,

Thanks for your reply. Following your advice we’ll keep using the deprecated method. Could you please update the documentation in case anyone else tries to follow the steps mentioned?

Kind Regards
Mehul Parmar