org.springframework.webflow.engine
Interface ViewSelector

All Known Implementing Classes:
ApplicationViewSelector, ExternalRedirectSelector, FlowDefinitionRedirectSelector, NullViewSelector

public interface ViewSelector

Factory that produces a new, configured ViewSelection object on each invocation, taking into account the information in the provided flow execution request context.

Note: this class is a runtime factory. Instances are used at flow execution time by objects like the ViewState to produce new view selections.

This class allows for easy insertion of dynamic view selection logic, for instance, letting you determine the view to render or the available model data for rendering based on contextual information.

Author:
Keith Donald, Erwin Vervaet
See Also:
ViewSelection, ViewState, EndState

Method Summary
 boolean isEntrySelectionRenderable(RequestContext context)
          Will the primary selection returned by 'makeEntrySelection' for the given request context be renderable in this request?
 ViewSelection makeEntrySelection(RequestContext context)
          Make a new "entry" view selection for the given request context.
 ViewSelection makeRefreshSelection(RequestContext context)
          Reconstitute a renderable view selection for the given request context to support a ViewState 'refresh' operation.
 

Method Detail

isEntrySelectionRenderable

boolean isEntrySelectionRenderable(RequestContext context)
Will the primary selection returned by 'makeEntrySelection' for the given request context be renderable in this request?

"Renderable" view selections typically can have 'render-actions' execute before they are created. An example would be an ApplicationView that forwards to a view template like a JSP. "Non-renderable" view selections are things like a flow execution redirect--no render actually occurs, but only a redirect--rendering happens on the new redirect request.

Parameters:
context - the current request context of the executing flow
Returns:
true if yes, false otherwise

makeEntrySelection

ViewSelection makeEntrySelection(RequestContext context)
Make a new "entry" view selection for the given request context. Called when a view-state, end-state, or other interactive state type is entered.

Parameters:
context - the current request context of the executing flow
Returns:
the entry view selection

makeRefreshSelection

ViewSelection makeRefreshSelection(RequestContext context)
Reconstitute a renderable view selection for the given request context to support a ViewState 'refresh' operation.

Parameters:
context - the current request context of the executing flow
Returns:
the view selection


Copyright © 2004-2007. All Rights Reserved.