Rock.Web.UI.Controls.AttributeEditor.OnLoad C# (CSharp) Method

OnLoad() protected method

Raises the E:System.Web.UI.Control.Load event.
protected OnLoad ( EventArgs e ) : void
e System.EventArgs The object that contains the event data.
return void
        protected override void OnLoad( EventArgs e )
        {
            base.OnLoad( e );

            if ( Page.IsPostBack && FieldTypeId.HasValue )
            {
                var field = Rock.Web.Cache.FieldTypeCache.Read( FieldTypeId.Value ).Field;
                var qualifierControls = new List<Control>();
                foreach ( Control control in _phQualifiers.Controls )
                {
                    qualifierControls.Add( control );
                }

                DefaultValue = _phDefaultValue.Controls.Count >= 1 ?
                    field.GetEditValue( _phDefaultValue.Controls[0], Qualifiers ) : string.Empty;

                Qualifiers = field.ConfigurationValues( qualifierControls );
            }
        }