Developer forum

Forum » Development » Adding UserParameterEditor in custom TaxProvider fails

Adding UserParameterEditor in custom TaxProvider fails

Niels Foldager
Reply

Hi Dynamicweb,

I'm trying to add an AddInParameter with the type of Dynamicweb.Extensibility.Editors.UserParameterEditor in our custom TaxProvider. It is not possible because the page is missing a javascript-file (UserSelector.js), which is included in other admin-pages. I hope this can be included in the EcomTaxSetting section. Is it possible?

Best regards
Niels Foldager


Replies

 
Alexander Gubenko
Alexander Gubenko
Reply

Hello Niels,

We have a bug with UserParameterEditor frown. I can suggest you workaround:
You able to override 'RenderAdditionalContent' method in your TaxProvider like this:

        public override void RenderAdditionalContent(TextWriter output)
        {
            base.RenderAdditionalContent(output);
            output.WriteLine("<script src=\"/Admin/Images/Controls/UserSelector/UserSelector.js\"></script>");
            output.WriteLine("<script src=\"/Admin/Resources/js/layout/Actions.js\"></script>");
        }

It allows you to use UserParameterEditor as well for the TaxProvider 

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi,

The issue is now bugged by DevOps Bug 1846, it will be fixed in an upcoming release. Thanks.

BR, Oleg QA

 
Niels Foldager
Reply

Thanks, Oleg & Alexander 

Best regards
Niels Foldager

 
Niels Foldager
Reply

Hi Oleg,

After adding the missing javascript files the page loads without errors. When I have selected some users and saved the settings in my custom TaxProvider, then the UserParameterEditor is empty after reloading the page. The TaxSettingProviderSettings (xml) contains the selected userIds. How can I load the selected users in the UserParameterEditor?

Best regards
Niels Foldager

 

 
Niels Foldager
Reply

Are there any suggestions on how to load the selected users/groups in the UserParameterEditor?

Best regards
Niels Foldager

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi,

The Bug 1846 has been fixed in Dynamicweb.Controls 4.2.4 package can be downloaded from nuget, please try to use.

BR, Oleg QA

 
Niels Foldager
Reply

Hi Oleg,

Thanks, it works.

Best regards
Niels Foldager

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Niels

The correction #1846 is also part of Hotfix version 9.10.9 now released 

You can get this from the download section : https://doc.dynamicweb.com/downloads/releases

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

You must be logged in to post in the forum