MyProperty propData = page.Property["MyProperty"] as MyProperty;
if(propData!=null)
{
propData.MyData = salon;
}
I have the same issue ,
Please provide help ASAP.
I followed those examples:
http://joelabrahamsson.com/entry/creating-a-custom-episerver-property-with-a-custom-class-as-value#comment866
Also consulted those: http://world.episerver.com/Articles/Items/Creating-custom-properties-in-EPiServer-CMS-5/
and http://world.episerver.com/Modules/Forum/Pages/thread.aspx?id=33667
I use EPiServer CMS 5 R2 SP2,
I generate controls dynamycally and I have list of boxes that I can fill with values, and when I save things are saved normally, but when I click on remove button on my control it successfully removes and updates the property (removing one itom from list) and setting new changed list to the property. I also call these to force save function:
PropertyInfoBox myProp = CurrentPage.Property["InfoBoxes"] as PropertyInfoBox;
if (myProp != null)
//myProp.InfoBoxSummary = newSet.CreateWritableClone();
myProp.Value = newSet.ToString();
DataFactory.Instance.Save(CurrentPage, EPiServer.DataAccess.SaveAction.Save);
//Force to save changes
base.ApplyChanges();//calls ApplyEditChanges
and in ApplyEditChanges I call in the end:
this.PropertyData.Value = propertyValue.CreateWritableClone();
this.PropertyData.IsModified = true;
propertyValue.IsModified = true;
SetValue(propertyValue);
In all stages my property is being set to new values I made, BUT when I click on Save button i Edit Mode in CMS it shows the old value and tht is the problem!
Why is that ? what is wrong ?
Please provide support ASAP.
Here you can find simple project to reproduce the issue:
http://cid-6ed48db4c81844b4.office.live.com/self.aspx/Public/UploadsForOthers/GenericLib.zip
You simply add it to any of your project and add that property to one of pages, it is simple text box control which has one button near it. Inside button event, text is being changed then saved the value of property. But on next click of the same button OR Save and Publish button you will notice that in CreateEditControls it gets back /fills with old values (before modification).
The pitty part is that its not possible to debug the EPiServer.dll coz Debug Symbols are not provided by EPiServer at their given address symbols.episerver.com , even I read many articles about it.
Hi,
I've been trying to save some string data (serialized xml) to a custom property that i've implemented as follows:a