Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
We are using approach below:
[EditorDescriptorRegistration(TargetType = typeof(string), UIHint = "ListOfChoices")]
public class ListOfChoicesEditorDescriptor : EditorDescriptor
{
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
{
SelectionFactoryType = typeof(ListOfChoicesFactory);
ClientEditingClass = "epi-cms.contentediting.editors.CheckBoxListEditor";
base.ModifyMetadata(metadata, attributes);
}
}
public class ListOfChoicesFactory: ISelectionFactory
{
public IEnumerable<ISelectItem> GetSelections(ExtendedMetadata metadata)
{
var options = new List<SelectItem>
{
new SelectItem { Value = "value", Text = "text" }
};
return options;
}
}
And then in page type:
[Display(GroupName = SystemTabNames.Content, Order = 20)]
[UIHint("ListOfChoices")]
public virtual string Choices { get; set; }
@Valdis, I have tried and I get 404 from http://localhost/secureUI/Shell/1.0.456/ClientResources/dtk/epi-cms/contentediting/editors/CheckBoxListEditor.js
any idea?
Interesting mine is coming from "{secureUI}/CMS/2.1.82/ClientResources/EPi/Cms/contentediting/editors/CheckBoxListEditor.js"
The client widgets changed root namespace in the 7.2 UI upgrade. For 7.1 the namespace should start with "epi.cms" and for 7.2 "epi-cms".
How to define property using PropertyCheckBoxList? What should be the type of this property?
Thanks