/// <exclude /> public Dictionary <string, string> GetBindingToClientIDMapping() { var result = new Dictionary <string, string>(); FormFlowUiDefinitionRenderer.ResolveBindingPathToClientIDMappings(_uiControl as IWebUiControl, result); return(result); }
/// <exclude /> public static Control GetFlowUi(FlowHandle flowHandle, string elementProviderName, string consoleId, out string uiContainerName) { uiContainerName = null; try { Control webControl = null; string viewId = ViewTransitionHelper.MakeViewId(flowHandle.Serialize()); FlowControllerServicesContainer flowServicesContainer = new FlowControllerServicesContainer(); flowServicesContainer.AddService(new ActionExecutionService(elementProviderName, consoleId)); flowServicesContainer.AddService(new ManagementConsoleMessageService(consoleId, viewId)); flowServicesContainer.AddService(new ElementDataExchangeService(elementProviderName)); FlowToken flowToken = flowHandle.FlowToken; IFlowUiDefinition flowUiDefinition = FlowControllerFacade.GetCurrentUiDefinition(flowToken, flowServicesContainer); var formFlowUiDefinition = flowUiDefinition as FormFlowUiDefinition; if (formFlowUiDefinition != null) { uiContainerName = formFlowUiDefinition.UiContainerType.ContainerName; IUiControl uiForm = FormFlowUiDefinitionRenderer.Render(consoleId, elementProviderName, flowToken, formFlowUiDefinition, WebManagementChannel.Identifier, false, flowServicesContainer); IWebUiControl webForm = (IWebUiControl)uiForm; webControl = webForm.BuildWebControl(); if (string.IsNullOrEmpty(webControl.ID)) { webControl.ID = "FlowUI"; } if (RuntimeInformation.TestAutomationEnabled) { var testAutomationLocatorInformation = formFlowUiDefinition.MarkupProvider as ITestAutomationLocatorInformation; if (testAutomationLocatorInformation != null) { var htmlform = webControl.Controls.OfType <HtmlForm>().FirstOrDefault(); if (htmlform != null) { htmlform.Attributes.Add("data-qa", testAutomationLocatorInformation.TestAutomationLocator); } } } } return(webControl); } catch (Exception ex) { ErrorServices.DocumentAdministrativeError(ex); ErrorServices.RedirectUserToErrorPage(uiContainerName, ex); } return(new LiteralControl("ERROR")); }
/// <exclude /> public string GetTitleFieldControlId() { IWebUiControl container = GetContainer(); if (_titleField.IsNullOrEmpty() || container == null) { return(string.Empty); } var mappings = new Dictionary <string, string>(); FormFlowUiDefinitionRenderer.ResolveBindingPathToCliendIDMappings(container, mappings); string clientId = mappings.ContainsKey(_titleField) ? mappings[_titleField] : ""; return(clientId); }