protected new void Edit(SC.Web.UI.Sheer.ClientPipelineArgs args) { SC.Diagnostics.Assert.ArgumentNotNull(args, "args"); if (this.Enabled) { if (args.IsPostBack) { if ((args.Result != null) && (args.Result != "undefined")) { string result = args.Result; if (result == "-") { result = string.Empty; } else if (this.Value != result) { SC.Context.ClientPage.Modified = true; } this.Value = result; HtmlTextWriter output = new HtmlTextWriter(new StringWriter()); this.RenderItems(output); SC.Web.UI.Sheer.SheerResponse.SetInnerHtml( this.ID, output.InnerWriter.ToString()); } } else { SC.Text.UrlString urlString = new SC.Text.UrlString( UIUtil.GetUri("control:TreeListExEditor")); SC.Web.UrlHandle handle = new SC.Web.UrlHandle(); string str3 = this.Value; if (str3 == "__#!$No value$!#__") { str3 = string.Empty; } handle["value"] = str3; handle["source"] = this.Source; handle["language"] = this.ItemLanguage; handle["itemid"] = this.ItemID; handle["itemlanguage"] = this.ItemLanguage; handle["itemversion"] = this.ItemVersion; handle.Add(urlString); SC.Web.UI.Sheer.SheerResponse.ShowModalDialog( urlString.ToString(), "800px", "500px", string.Empty, true); args.WaitForPostBack(); } } }
protected override void OnLoad(EventArgs e) { if (!Context.ClientPage.IsEvent) { SC.Web.UrlHandle handle = SC.Web.UrlHandle.Get(); SC.Diagnostics.Assert.IsNotNull(handle, "handle"); Sitecore.Sharedsource.Shell.Applications.ContentEditor.TreeList ssTreeList = this.TreeList as Sitecore.Sharedsource.Shell.Applications.ContentEditor.TreeList; SC.Diagnostics.Assert.IsNotNull(ssTreeList, "ssTreeList"); ssTreeList.ItemID = handle["itemid"]; ssTreeList.ItemLanguage = handle["itemlanguage"]; ssTreeList.ItemVersion = handle["itemversion"]; } base.OnLoad(e); }