Moving JsfViewFactoryCreator

This commit is contained in:
Jeremy Grelle
2007-10-26 20:15:53 +00:00
parent 1aa5d162b5
commit 2a5add92c4
2 changed files with 2 additions and 4 deletions

View File

@@ -0,0 +1,29 @@
package org.springframework.faces.webflow;
import javax.faces.FactoryFinder;
import javax.faces.lifecycle.LifecycleFactory;
import org.springframework.binding.expression.Expression;
import org.springframework.webflow.engine.builder.ViewFactoryCreator;
import org.springframework.webflow.execution.Action;
import org.springframework.webflow.execution.ViewFactory;
/**
* A ViewFactoryCreator implementation for creating JSF ViewFactories
* @author Jeremy Grelle
*
*/
public class JsfViewFactoryCreator implements ViewFactoryCreator {
public Action createFinalResponseAction(Expression viewName) {
return new JsfRenderFinalResponseAction(new JsfViewFactory(((LifecycleFactory) FactoryFinder
.getFactory(FactoryFinder.LIFECYCLE_FACTORY)).getLifecycle(FlowLifecycleFactory.FLOW_LIFECYCLE_ID),
viewName));
}
public ViewFactory createViewFactory(Expression viewName) {
return new JsfViewFactory(((LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY))
.getLifecycle(FlowLifecycleFactory.FLOW_LIFECYCLE_ID), viewName);
}
}