November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi
That sure looks like a bug. I'll add it to our bug tracker.
Thanks for reporting this, and also for providing a work around.
Update:
Bug registered as: #95628: Not possible to add full refresh using the FullRefreshPropertiesMetaData extension method
Regards
Per Gunsarfs
EPiServer Development Team
I have tried to get full refresh to work with MVC and razor the way episerver suggests but so far no luck. I will write below what I did and also what workaround I used to get it to work.
I have a boolean property on one of my blocks that adds a border. What I wanted to achieve was to make a preview page for the block that updated the visuals of the block when the value of that Boolean changed. This required a page refresh then the property changed. I tried following this example in the episerver sdk http://sdkbeta.episerver.com/SDK-html-Container/?path=/SdkDocuments/CMS/7/Knowledge%20Base/Developer%20Guide/Content/Pages%20and%20Blocks/How%20To/Edit%20hints%20in%20MVC.htm&vppRoot=/SdkDocuments//CMS/7/Knowledge%20Base/Developer%20Guide/ .
This is what I did.
In the controller I added AddFullRefreshFor for the border Boolean.
In the view I added the full refresh method and the property.
This did not work.
It looks like there is a bug in the FullRefreshPropertiesMetaData method.
The helper.viewdata returns a list of strings that can't be cast to a IList<EditHint> and thus it will always be null.
SOLUTION
The solution that I did was to write my own extension method that solves this.
And call this method in the view instead.