Esempio n. 1
0
        public IUiControl Render(
            IUiControl innerForm,
            IUiControl customToolbarItems,
            IFormChannelIdentifier channel,
            IDictionary <string, object> eventHandlerBindings,
            string containerLabel,
            string containerLabelField,
            ResourceHandle containerIcon)
        {
            if (string.IsNullOrEmpty(_templateFormVirtualPath) == false)
            {
                WebEmbeddedFormUiControl document = new WebEmbeddedFormUiControl(channel);
                document.FormPath = _templateFormVirtualPath; // "/Composite/Templates/Document.xml";

                document.Bindings = new Dictionary <string, object>(eventHandlerBindings);
                document.Bindings.Add("Form", innerForm);
                if (customToolbarItems != null)
                {
                    document.Bindings.Add("CustomToolbarItems", customToolbarItems);
                }

                _webDocument = new TemplatedExecutionContainer(document, _templateUserControlType, containerLabel, containerLabelField, containerIcon);
            }
            else
            {
                _webDocument = new TemplatedExecutionContainer((IWebUiControl)innerForm, _templateUserControlType, containerLabel, containerLabelField, containerIcon);
            }

            return(_webDocument);
        }
Esempio n. 2
0
        public IUiControl Render(
            IUiControl innerForm, 
            IUiControl customToolbarItems, 
            IFormChannelIdentifier channel, 
            IDictionary<string, object> eventHandlerBindings, 
            string containerLabel, 
            string containerLabelField, 
            ResourceHandle containerIcon)
        {
            if (string.IsNullOrEmpty(_templateFormVirtualPath) == false)
            {
                WebEmbeddedFormUiControl document = new WebEmbeddedFormUiControl(channel);
                document.FormPath = _templateFormVirtualPath; // "/Composite/Templates/Document.xml";

                document.Bindings = new Dictionary<string, object>(eventHandlerBindings);
                document.Bindings.Add("Form", innerForm);
                if (customToolbarItems != null)
                {
                    document.Bindings.Add("CustomToolbarItems", customToolbarItems);
                }

                _webDocument = new TemplatedExecutionContainer(document, _templateUserControlType, containerLabel, containerLabelField, containerIcon);
            }
            else
            {
                _webDocument = new TemplatedExecutionContainer((IWebUiControl)innerForm, _templateUserControlType, containerLabel, containerLabelField, containerIcon);
            }

            return _webDocument;
        }