protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); base.Attributes.Add("vm-WebServiceMethodName", this.WebServiceMethodName); base.Attributes.Add("vm-WebServiceParameterName", this.WebServiceParameterName.ToJsonString(null)); base.Attributes.Add("vm-ShowErrors", this.ShowErrors.ToJsonString(null)); base.Attributes.Add("vm-NextOnError", this.NextOnError.ToJsonString(null)); base.Attributes.Add("vm-NextOnCancel", this.NextOnCancel.ToJsonString(null)); base.Attributes.Add("vm-ParameterNamesList", this.ParameterNamesList); if (this.ServiceUrl != null) { base.Attributes.Add("vm-ServiceUrl", EcpUrl.ProcessUrl(this.ServiceUrl.ServiceUrl)); } }
protected override IEnumerable <ScriptDescriptor> GetScriptDescriptors() { IEnumerable <ScriptDescriptor> scriptDescriptors = base.GetScriptDescriptors(); ScriptControlDescriptor scriptControlDescriptor = (ScriptControlDescriptor)scriptDescriptors.First <ScriptDescriptor>(); scriptControlDescriptor.AddProperty("ServiceUrl", EcpUrl.ProcessUrl(this.ServiceUrl.ServiceUrl)); scriptControlDescriptor.AddProperty("SupportAsyncGetList", this.SupportAsyncGetList, true); scriptControlDescriptor.AddProperty("ClientSort", this.ClientSort, true); if (this.RefreshCookieName != null) { scriptControlDescriptor.AddProperty("RefreshCookieName", this.RefreshCookieName); } if (!this.RefreshAfter.IsNullOrEmpty()) { scriptControlDescriptor.AddProperty("RefreshAfter", this.RefreshAfter); } scriptControlDescriptor.AddComponentProperty("RefreshWebServiceMethod", this.RefreshWebServiceMethod.ClientID); return(scriptDescriptors); }