Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-12836

org.hippoecm.hst.core.parameters.ValueListProvider executed in wrong HstRequestContext

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Won't Fix
    • None
    • None
    • site-toolkit
    • None

    Description

      If you implement ValueListProvider e.g. something like:

          @Parameter(name = "foo", required = true, displayName = "Bar")
          @DropDownList(valueListProvider = FooBar.class)
          String getFirstSector();
      

      and your implementation is:

      final HstRequestContext ctx = RequestContextProvider.get();
                  final ValueListManager valueListManager = HstServices.getComponentManager().getComponent(ValueListManager.class.getName());
                  final HippoBean baseBean = ctx.getSiteContentBaseBean();
      

      You get following error, thrown in org.hippoecm.hst.content.tool.DefaultContentBeansTool#getAnnotatedClasses

      java.lang.IllegalStateException: No content bean annotation class resource path found.
      
      

      Because: servletContext.getInitParameter(BEANS_ANNOTATED_CLASSES_CONF_PARAM) is executed in /cms context instead of /site

      Attachments

        Issue Links

          Activity

            People

              aschrijvers Ard Schrijvers
              mmilicevic Marijan Milicevic
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: