Developer forum

Forum » Development » GetAppenderInfo missfire in ProductFieldType Provider

GetAppenderInfo missfire in ProductFieldType Provider

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have to pass along a question from one of our developers.

We want  to create a custom ProductFieldTypeProvider; we have defined a parameter named UrlToPage ; the problem is that when the function Render is called
the parameter UrlToPage is null; this looks like the parameter was not loaded with the value that is found in the configuration.
I see that when function GetAppenderInfo is called with the settings dictionary the "settings" has the expected values.
In Render function I need to know the value from UrlPage in order to fill in some information based on it.

Here is the piece of code we have used:

[AddInName("DefineCustomFieldTypeProvider")]
    [AddInLabel("DefineCustomFieldTypeProvider")]
    [AddInActive(true)]
    [Serializable]
    public class DefineCustomFieldTypeProvider : ProductFieldTypeProvider, IDropDownOptions
    {
        [AddInParameter("URL to page")]
        [AddInParameterEditor(typeof(PageSelectEditor), "inputClass=inputControl")]
        [AddInParameterGroup("Source")]
        public string UrlToPage { get; set; }        public override string GetAppenderInfo(string languageId, string settings)
        {
            return GetAppenderInfo(languageId, GetParameterValues(settings));
        }        public override string GetAppenderInfo(string languageId, Dictionary<string, string> settings)
        {
            return "";
        }        protected override Control Render(string id, bool enabled, string value, bool hasError, List<Dynamicweb.UI.Elements.Actions.FieldAddOn> addOns)
        {
}
}

Thank you, 

Adrian

 


Replies

 

You must be logged in to post in the forum