I am trying to create a custom property which exists from multiple other properties: PropertyPageReference, PropertyXhtmlString and PropertyImageUrl.
In the constructor of the class, I have the following:
Link = PropertyPageReference.Parse("");
Text = PropertyXhtmlString.Parse( "" );
Image = newPropertyImageUrl();
Image.LoadData( "" );
The editor-control is using the PropertyControlClassFactory to create the sub-controls. This works fine for the link and text, but for the image this results in the following error:
[NullReferenceException: Object reference not set to an instance of an object.]
EPiServer.Editor.HtmlEditor.GetFileManagerBrowserUrl(PageReference id, PageReference parent, Int32 folderid) +57
EPiServer.Web.PropertyControls.PropertyUrlControl.CreateLinkEditorScript() +111
EPiServer.Web.PropertyControls.PropertyUrlControl.SetupEditControls() +502
System.Web.UI.Control.EnsureChildControls() +145
System.Web.UI.Control.PreRenderRecursiveInternal() +60
System.Web.UI.Control.PreRenderRecursiveInternal() +223
I also tried creating the property using the Parse-method, but then I'll end up with a PropertyString instead of a PropertyImageUrl.
How should I create the correct property for an new, empty custom property?
I am trying to create a custom property which exists from multiple other properties: PropertyPageReference, PropertyXhtmlString and PropertyImageUrl.
In the constructor of the class, I have the following:
Link = PropertyPageReference.Parse("");
Text = PropertyXhtmlString.Parse( "" );
Image = newPropertyImageUrl();
Image.LoadData( "" );
The editor-control is using the PropertyControlClassFactory to create the sub-controls. This works fine for the link and text, but for the image this results in the following error:
I also tried creating the property using the Parse-method, but then I'll end up with a PropertyString instead of a PropertyImageUrl.
How should I create the correct property for an new, empty custom property?