Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

PropertyList changes not detected

$
0
0

I really like the new PropertyList<T> in EPiServer. There is a great blog post by Per Magne Skuseth on how to use it with simple classes.

I used Per's code as an example but I ended up with some strange behaviour (yeah yeah, it's beta code I know)

In the UI I can add and remove entries to the list and then publish the changes, this works fine. However when I try to modify entries in the list, changes are not detected. (Try changing the age of a person)

Same goes for modifying entries from code.

var clone = currentPage.CreateWritableClone() as StartPage;
clone.Contacts[0].Age = 150; //Very old guy
_contentRepository.Save(clone, SaveAction.Publish, AccessLevel.NoAccess);

No change is stored in the database, nothing is published.

Debugging learned me that IsModified on the PropertyList is always false. How do I get my changes detected? 

Thanks,
Mark


Viewing all articles
Browse latest Browse all 9076

Trending Articles