Implementing toolbox filtering by role

Posted by Community Admin on 04-Aug-2018 04:14

Implementing toolbox filtering by role

All Replies

Posted by Community Admin on 03-Nov-2016 00:00

Hi,

We are trying to implement toolbox filtering by role based on the the steps on the Sitefinity website. docs.sitefinity.com/toolbox-filtering-register-the-itoolboxfilter-in-the-objectfactory

We got the site to compile without any issue.

On Sitefinity startup, it gives the following error. Does anyone know what the issue is and how to fix this? Thanks.

Resolution of the dependency failed, type = "Telerik.Sitefinity.DesignerToolbox.IToolboxFilter", name = "(none)". Exception occurred while: while resolving. Exception is: InvalidOperationException - The current type, Telerik.Sitefinity.DesignerToolbox.IToolboxFilter, is an interface and cannot be constructed. Are you missing a type mapping? ----------------------------------------------- At the time of the exception, the container was: Resolving Telerik.Sitefinity.DesignerToolbox.IToolboxFilter,(none)

Posted by Community Admin on 24-Nov-2016 00:00

Hi Allan.

I see this is marked as Answered.   How did you fix this?

Regards,

Tracy B

Posted by Community Admin on 24-Nov-2016 00:00

You have to add the scripts and components to the json file

 



  "priority": 1,
  "scripts": [     
        "client-components/selectors/common/sf-selected-items-view.js"
    ],

    "components" : ["sf-dynamic-items-selector", "sf-user-selector"]

   

Posted by Community Admin on 22-Feb-2017 00:00

I resolved this problem by passing the name of the default filter as an argument to the ObjectFactory resolve method.  See here:

IToolboxFilter currentFilter = ObjectFactory.Resolve<IToolboxFilter>("Telerik.Sitefinity.DesignerToolbox.DefaultToolboxFilter");

 

Relevant knowledge base article: knowledgebase.progress.com/.../How-to-create-toolbox-filter-based-on-a-site-in-multisite-scenario

This thread is closed