/*
* Angkor Web Framework
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package com.tirsen.angkor.process;
import com.tirsen.angkor.RenderContext;
import com.tirsen.angkor.ViewFactory;
public class SingleViewFactoryRenderValve extends RenderValve
{
private ViewFactory factory;
public SingleViewFactoryRenderValve(ViewFactory factory)
this.factory = factory;
}
protected Pipeline createRenderPipeline()
Pipeline pipeline = super.createRenderPipeline();
pipeline.addValve(new DoRenderValve());
return pipeline;
public void execute(ExecuteContext exec) throws Exception
RenderContext renderContext = (RenderContext) exec.getAttribute(ExecuteContext.RenderContextAttribute);
Pipeline subPipeline = createRenderPipeline();
ExecuteContext subExec = subPipeline.createExecuteContext(renderContext);
subExec.setAttribute(ViewFactoryAttribute, factory);
subPipeline.execute(subExec);
exec.executeNext();