November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi,
I have very vague memories of seing something similiar when trying to add primitives or (generic) collections as page objects. You must always use a class. You could of course create a class which only has one property to carry the value you want to save.
Another vague memory has something to do with autogenerated classes, like the anonymous types generated by lambdas or classes created by the JIT compiler for the aspx/ascx.
Can you post the code where you try to add the page object causing the exception?
Damn... my first post was ugly formatted...
Your first vague memory was correct :-)
I was trying to save a class like this one:
public class Comment
{
public Guid CommentGuid { get; set; }
public DateTime DatePosted { get; set; }
public String UserName { get; set; }
public String CommentText { get; set; }
}
I added another class that contains a list of "Comment":
public class CommentsList
{
public IList<Comment> Comments { get; set; }
public CommentsList()
{
Comments = new List<Comment>();
}
}
... and saving this "CommentList" as a PageObject works like a charm. Thanks for the help Magnus!
I'm facing the same problem when I'm trying to save the following class
public class PomData : IDynamicData
{
public bool IsSecure { get; set; }
public Identity Id { get; set; }
}
What happens if you try to save a similar object that does not implement IDynamicData? IDynamicData is good for saving things in your own store, but could it be that it upsets the PageObject PropertyBag handling?
I'm just experimenting with PageObjects in CMS 6 R2 (Beta) and come across an issue. I get an exception when I try to save:
Contains potentially dangerous (SQL Injection) characters
Parameter name: storeName
Stack Trace: