Try our conversational search powered by Generative AI!

Custom property with PropertyImageUrl

Vote:
 

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?

#59361
Jun 04, 2012 11:40
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.