ProNotion
06/04/2024, 1:20 PMDataEditor
[DataEditor(
"RadioButtonListWithDefault",
EditorType.PropertyValue,
"RadioButtonList with default selection",
"~/App_Plugins/MyProject/PropertyEditors/RadioButtonListWithDefault/RadioButtonListWithDefault.html",
Group = Constants.PropertyEditors.Groups.Lists,
ValueType = ValueTypes.Text)]
I am overriding CreateConfigurationEditor
as follows:
protected override IConfigurationEditor CreateConfigurationEditor() =>
new RadioButtonListWithDefaultConfigurationEditor(_ioHelper, _editorConfigurationParser);
My ConfigurationEditor inherits ConfigurationEditor<RadioButtonListWithDefaultConfiguration>
And my Configuration class looks like this:
public class RadioButtonListWithDefaultConfiguration : ValueListConfiguration
{
[ConfigurationField("default", "Default Value", "dropdown", Description = "Select the default value from the list")]
public string Default { get; set; }
}
The view file exists in the specified location but is never loaded. I need it to be loaded so that I can set the default value in the UI.
What am I missing?Ravi
06/05/2024, 5:36 AMProNotion
06/05/2024, 10:28 AMdropdown
to textstring
it renders fine. But, that is to be expected since I think the reason the dropdown is not showing is that is has no data and it has no data because the view is not loaded.
4. No
5. No, not yet
https://cdn.discordapp.com/attachments/1247540478442737744/1247859686947164280/image.png?ex=66618f65&is=66603de5&hm=69e735b45341f4b4953584c735a2393d056a4c262c02e9d493733ab12920127a&ProNotion
06/05/2024, 10:34 AMProNotion
06/05/2024, 10:40 AMpublic class RadioButtonListWithDefaultConfiguration : ValueListConfiguration
{
[ConfigurationField("default", "Default Value", "~/App_Plugins/MyProject/PropertyEditors/RadioButtonListWithDefault/RadioButtonListWithDefault.html", Description = "Select the default value from the list")]
public string Default { get; set; }
}
However, it seems a little pointless when there is already one that will do the job just fine but then question is - how do I push the items into the dropdown view using this approach?ProNotion
06/05/2024, 11:03 AMRavi
06/05/2024, 12:29 PMProNotion
06/05/2024, 1:19 PMconfig.Items
collection into it. So far I've been unsuccessful. Wherever possible I'd prefer not to be reinventing the wheel.Ravi
06/05/2024, 1:22 PMRavi
06/05/2024, 1:23 PMProNotion
06/06/2024, 7:59 AMProNotion
06/17/2024, 1:56 PM