This commit is contained in:
Keith Donald
2008-04-25 03:58:31 +00:00
parent 26abaa350a
commit 9ce9f4e380
4 changed files with 28 additions and 12 deletions

View File

@@ -33,13 +33,20 @@ import org.springframework.webflow.mvc.servlet.ServletMvcViewFactory;
import org.springframework.webflow.mvc.view.FlowViewResolver;
/**
* View factory creator implementation that produces View Factories that create native Spring MVC-based views.
* Returns {@link ViewFactory view factories} that create native Spring MVC-based views. Used by a FlowBuilder to
* configure a flow's view states with Spring MVC-based view factories.
* <p>
* This implementation detects whether it is running in a Servlet or Portlet MVC environment, and returns instances of
* the default view factory implementation for that environment.
* <p>
* By default, this implementation creates view factories that resolve their views by loading flow-relative resources,
* such as .jsp templates located in a flow working directory. This class also supports rendering views resolved by
* pre-existing Spring MVC {@link ViewResolver view resolvers}.
*
* This class is used by a flow builder in a Spring MVC environment to configure view factories on flows that render
* Spring MVC-based views.
*
* This class supports rendering views resolved by existing Spring MVC-based resolver infrastructure, or, if no such
* infrastructure is configured, JSP resources relative to the flow definition being built.
* @see ServletMvcViewFactory
* @see PortletMvcViewFactory
* @see FlowResourceFlowViewResolver
* @see DelegatingFlowViewResolver
*
* @author Keith Donald
* @author Scott Andrews
@@ -54,6 +61,7 @@ public class MvcViewFactoryCreator implements ViewFactoryCreator, ApplicationCon
* Create a new Spring MVC View Factory Creator.
* @see #setDefaultViewSuffix(String)
* @see #setViewResolvers(List)
* @see #setFlowViewResolver(FlowViewResolver)
*/
public MvcViewFactoryCreator() {
@@ -76,8 +84,8 @@ public class MvcViewFactoryCreator implements ViewFactoryCreator, ApplicationCon
}
/**
* Configure an {@link FlowResourceFlowViewResolver} capable of resolving view resources by applying the
* specified default resource suffix. Default is .jsp.
* Configure an {@link FlowResourceFlowViewResolver} capable of resolving view resources by applying the specified
* default resource suffix. Default is .jsp.
* @param defaultViewSuffix the default view suffix
*/
public void setDefaultViewSuffix(String defaultViewSuffix) {
@@ -87,8 +95,9 @@ public class MvcViewFactoryCreator implements ViewFactoryCreator, ApplicationCon
}
/**
* Sets the Spring MVC {@link ViewResolver view resolvers} to delegate to resolve views selected by flows. If
* multiple resolvers are to be used, the resolvers should be ordered in the manner they should be applied.
* Sets the chain of Spring MVC {@link ViewResolver view resolvers} to delegate to resolve views selected by flows.
* Allows for reuse of existing View Resolvers configured in a Spring application context. If multiple resolvers are
* to be used, the resolvers should be ordered in the manner they should be applied.
* @param viewResolvers the view resolver list
*/
public void setViewResolvers(List viewResolvers) {

View File

@@ -0,0 +1,7 @@
<html>
<body>
<p>
Support for configuring Spring MVC-based ViewFactory implementations when building a Flow.
</p>
</body>
</html>

View File

@@ -37,7 +37,7 @@ import org.springframework.webflow.mvc.view.AbstractMvcView;
public class PortletMvcView extends AbstractMvcView {
/**
* Creates a new portlet view.
* Creates a new Portlet MVC view.
* @param view the view to render
* @param context the current flow request context
*/

View File

@@ -32,7 +32,7 @@ import org.springframework.webflow.mvc.view.AbstractMvcView;
public class ServletMvcView extends AbstractMvcView {
/**
* Creates a new servlet view.
* Creates a new Servlet MVC view.
* @param view the view to render
* @param context the current flow request context.
*/