Implements U4-165

This commit is contained in:
hartvig
2012-08-14 07:45:47 -02:00
parent d329123cda
commit c11bc9559c
3 changed files with 16 additions and 180 deletions

View File

@@ -1,7 +1,14 @@
using umbraco.cms.businesslogic.property;
namespace umbraco.editorControls.userControlGrapper
{
public interface IUsercontrolDataEditor
{
object value { get; set;}
}
public interface IUsercontrolPropertyData
{
Property PropertyObject { set; }
}
}

View File

@@ -7,7 +7,7 @@ using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using umbraco.cms.businesslogic.property;
using umbraco.interfaces;
using umbraco.editorControls;
using umbraco.cms.businesslogic.datatype;
@@ -83,6 +83,14 @@ namespace umbraco.editorControls.userControlGrapper
}
// Add property data to the usercontrol if it supports it
// TODO: Find the best way to test for an interface!
IUsercontrolPropertyData propertyData = oControl as IUsercontrolPropertyData;
if (propertyData != null)
{
propertyData.PropertyObject = new Property(((usercontrolData)_data).PropertyId);
}
this.Controls.Add(oControl);
if (!Page.IsPostBack)