Implementing toolbox filtering by role
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)
Hi Allan.
I see this is marked as Answered. How did you fix this?
Regards,
Tracy B
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"]
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