private void RenderDefaultValueControls(HtmlTextWriter output)
        {
            var selectedSharepointListName = SharepointListDropDownList.SelectedValue;
            var selectedSharepointField    = SharepointListFieldDropDownList.SelectedValue;

            if (selectedSharepointField == DefaultFieldValue)
            {
                return;
            }
            if (selectedSharepointListName == DefaultListValue)
            {
                return;
            }

            var sharepointList = SPContext.Current.Web.Lists[selectedSharepointListName];
            var field          = sharepointList.Fields[selectedSharepointField];

            switch (field.Type)
            {
            case SPFieldType.Choice:
                DefaultValueAsListBox.RenderControl(output);
                break;

            case SPFieldType.Lookup:
                DefaultValueAsListBox.RenderControl(output);
                break;

            case SPFieldType.Currency:
            case SPFieldType.Integer:
            case SPFieldType.Number:
            case SPFieldType.Text:
                DefaultValueAsTextBox.RenderControl(output);
                break;

            case SPFieldType.User:
                DefaultValueAsPeopleEditor.RenderControl(output);
                break;

            case SPFieldType.DateTime:
                BeginDateLabel.RenderControl(output);
                output.Write("<br/>");
                JqueryDatePickerBeginDate.RenderControl(output);
                output.Write("<br/>");
                EndDateLabel.RenderControl(output);
                output.Write("<br/>");
                JqueryDatePickerEndDate.RenderControl(output);
                break;
            }
        }
        protected override void RenderToolPart(HtmlTextWriter writer)
        {
            AddAttributesToRender(writer);

            writer.RenderBeginTag(HtmlTextWriterTag.Table);           // <table>

            writer.RenderBeginTag(HtmlTextWriterTag.Tr);              // <tr>
            writer.RenderBeginTag(HtmlTextWriterTag.Td);              // <td>
            new LiteralControl("Principals: ").RenderControl(writer); // <label/>
            writer.RenderEndTag();                                    // </td>
            writer.RenderEndTag();                                    // </tr>

            writer.RenderBeginTag(HtmlTextWriterTag.Tr);              // <tr>
            writer.RenderBeginTag(HtmlTextWriterTag.Td);              // <td>
            pplEditor.RenderControl(writer);                          // <select/>
            writer.RenderEndTag();                                    // </td>
            writer.RenderEndTag();                                    // </tr>

            writer.RenderEndTag();                                    // </table>
        }