[minor bug?] Dynamic content: PropertyLongString property shows input text instead of textarea

Vote:
 

The title says it all. The code:

    public class BlockQuote : DynamicContentBase
    {
        #region Properties
        public string Text
        {
            get { return (string)base.Properties["Text"].Value; }
            set { base.Properties["Text"].Value = value; }
        }
        #endregion

        public BlockQuote()
        {
            this.Properties = new PropertyDataCollection
                {
                    {"Text", new PropertyLongString()}
                };
        }
    }

When editting the Text property of the dynamic content an input of type text (thus one line) is shown. A textarea is expected.

#64422
Dec 20, 2012 11:58
Vote:
 

This is a side effect of moving the default string backing type to PropertyLongString for the new typed models that affects the old editing system that is still used for dynamic content. I have written about the work around here:

http://world.episerver.com/Modules/Forum/Pages/thread.aspx?id=63109

#64459
Edited, Dec 20, 2012 16:21
Vote:
 
[PropertyDefinitionTypePlugIn]
    public class LegacyLongString : PropertyLongString
    {
        public override IPropertyControl CreatePropertyControl()
        {
            return new PropertyLongStringControl();
        }
    }

    This should do it for you per Linus's post

#64462
Edited, Dec 20, 2012 18:24
Vote:
 

Thank you, works perfectly.

#64512
Dec 24, 2012 16:34
Vote:
 

CreatePropertyControl() doesn't work in EpiServer7.5. 

I had created one custom property in EpiServer6R2 to display horizontal ine in Edit mode (for sepration of header and footer properties) but this property doesn't work in 7.5. it doesn't call CreatePropertyControl() while debugging. Do you have any ideas why it is not calling?

Thanks in advance.

#111632
Oct 16, 2014 18:27
Vote:
 

Komal. That does not work in 7.5, custom properties are completely rewritten.

Take a lock at Linus blog or Teds blog and you will find examples on how to do

#111641
Oct 17, 2014 6:28
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.