Inheritance: IViewComponentContext
Beispiel #1
0
        public void RenderComponent(string componentName, IDictionary parameters)
        {
            var componentContext =
                new BrailViewComponentContext(this, null, componentName, OutputStream,
                                              new Hashtable(parameters, StringComparer.InvariantCultureIgnoreCase));

            AddViewComponentProperties(componentContext.ComponentParameters);
            var componentFactory = (IViewComponentFactory)context.GetService(typeof(IViewComponentFactory));
            var component        = componentFactory.Create(componentName);

            component.Init(context, componentContext);
            component.Render();
            if (componentContext.ViewToRender != null)
            {
                OutputSubView("/" + componentContext.ViewToRender, componentContext.ComponentParameters);
            }
            RemoveViewComponentProperties(componentContext.ComponentParameters);
        }
Beispiel #2
0
		public void RenderComponent(string componentName, IDictionary parameters)
		{
			var componentContext =
				new BrailViewComponentContext(this, null, componentName, OutputStream,
				                              new Hashtable(parameters, StringComparer.InvariantCultureIgnoreCase));
			AddViewComponentProperties(componentContext.ComponentParameters);
			var componentFactory = (IViewComponentFactory) context.GetService(typeof(IViewComponentFactory));
			var component = componentFactory.Create(componentName);
			component.Init(context, componentContext);
			component.Render();
			if (componentContext.ViewToRender != null)
			{
				OutputSubView("/" + componentContext.ViewToRender, componentContext.ComponentParameters);
			}
			RemoveViewComponentProperties(componentContext.ComponentParameters);
		}