removed some overloaded bean: prefix support for view=, on=, and to=
This commit is contained in:
Keith Donald
2008-03-07 16:38:38 +00:00
parent 6e4c4236f6
commit 03007f9fc6
20 changed files with 135 additions and 181 deletions

View File

@@ -50,14 +50,14 @@ public class JsfViewFactory implements ViewFactory {
private static final Log logger = LogFactory.getLog(JsfViewFactory.class);
private final Expression viewExpr;
private final Expression viewIdExpression;
private final ResourceLoader resourceLoader;
private final Lifecycle lifecycle;
public JsfViewFactory(Expression viewExpr, ResourceLoader resourceLoader, Lifecycle lifecycle) {
this.viewExpr = viewExpr;
public JsfViewFactory(Expression viewIdExpression, ResourceLoader resourceLoader, Lifecycle lifecycle) {
this.viewIdExpression = viewIdExpression;
this.resourceLoader = resourceLoader;
this.lifecycle = lifecycle;
}
@@ -135,7 +135,7 @@ public class JsfViewFactory implements ViewFactory {
}
private String resolveViewName(RequestContext context) {
String viewId = (String) viewExpr.getValue(context);
String viewId = (String) viewIdExpression.getValue(context);
if (viewId.startsWith("/")) {
return viewId;
} else {

View File

@@ -22,7 +22,6 @@ import javax.faces.lifecycle.LifecycleFactory;
import org.springframework.binding.expression.Expression;
import org.springframework.core.io.ResourceLoader;
import org.springframework.webflow.engine.builder.ViewFactoryCreator;
import org.springframework.webflow.execution.Action;
import org.springframework.webflow.execution.ViewFactory;
/**
@@ -36,12 +35,12 @@ public class JsfViewFactoryCreator implements ViewFactoryCreator {
private Lifecycle lifecycle;
public Action createFinalResponseAction(Expression viewName, ResourceLoader resourceLoader) {
return new JsfFinalResponseAction(new JsfViewFactory(viewName, resourceLoader, getLifecycle()));
public ViewFactory createViewFactory(Expression viewIdExpression, ResourceLoader resourceLoader) {
return new JsfViewFactory(viewIdExpression, resourceLoader, getLifecycle());
}
public ViewFactory createViewFactory(Expression viewName, ResourceLoader resourceLoader) {
return new JsfViewFactory(viewName, resourceLoader, getLifecycle());
public String getViewIdByConvention(String viewStateId) {
return viewStateId + FACELETS_EXTENSION;
}
private Lifecycle createFlowFacesLifecycle() {
@@ -58,8 +57,4 @@ public class JsfViewFactoryCreator implements ViewFactoryCreator {
return lifecycle;
}
public String createViewIdByConvention(String viewStateId) {
return viewStateId + FACELETS_EXTENSION;
}
}