/// <summary>
        /// 
        /// </summary>
        /// <param name="actual"></param>
        public AggregatePanelPageProxy(IAggregatePanelPage actual)
            : base(actual)
        {
            this.actual = actual;
            //Construct the fields of the DetailPanelPage class
            FieldInfo[] fields = actual.GetType().GetFields(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);

            for (int i = 0; i < fields.Count(); i++)
            {
                FieldInfo field = fields[i];
                if (field.GetCustomAttributes(typeof(BindingAttribute), false).Count() > 0)
                    fields[i].SetValue(actual, Activator.CreateInstance(field.FieldType));
            }
        }
        /// <summary>
        /// Raises the System.Web.UI.Control.Init event to initialize the page.
        /// </summary>
        /// <param name="e">An System.EventArgs that contains the event data.</param>
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            this.Initialize();

            // create various controls in aggregate panel page.
            ConstructorInfo constructor = this.aggregatePanelConfiguration.Type.GetConstructor(Type.EmptyTypes);
            this.aggregatePanelPage = constructor.Invoke(null) as IAggregatePanelPage;
            this.aggregatePanelPage.Configuration = this.dynamicPage.Configuration;
            this.aggregatePanelPage.ShowMessage += new Action<MessageTypes, string>(base.ShowMessage);
            this.aggregatePanelPage.SetupContextTempVariables(base.GetRequestHandler(), new SetupApplicationContextVariablesEventArgs());

            this.PermissionCheck();

            HtmlGenericControl htmlTag = new HtmlGenericControl("html");
            htmlTag.Attributes["xmlns"] = "http://www.w3.org/1999/xhtml";
            this.Controls.Add(htmlTag);

            this.CreateHtmlHead(htmlTag);
            this.CreateHtmlBody(htmlTag);

            try
            {
                this.aggregatePanelPage.OnInit(base.GetRequestHandler(), new AggregatePanelPageEventArgs(this.CommandArgument, this.EntityIdEnumerable));
            }
            catch (ThreadAbortException)
            {
                throw;
            }
            catch (ValidationException exp)
            {
                base.ShowMessage(MessageTypes.Warn, exp.Message);
            }
            catch (Exception exp)
            {
                string errorMessage = string.Format(CultureInfo.InvariantCulture, UNKNOWN_ERROR_LOGGING_MSG, HttpContext.Current.Request.Url);
                Logger.Instance(this).Error(errorMessage, exp);
                base.ShowMessage(MessageTypes.Error, Resources.DP_UnknownErrorDetail);
            }
        }