Update JsfView to ensure that saveState() called when processing
events. This is required to ensure that the Mojarra StateContext
will unsubscribe listeners from the UIViewRoot.
Issue: SWF-1577
Change JsfView.userEventQueued() to check for 'javax.faces.ViewState'
via the FacesContext rather than the RequestContext. This allows
potential multi-part request submissions to be processed by JSF rather
than Spring.
Issue: SWF-1482
This change makes it possible to use validation hints in conjunction
with declarative, JSR-303 validation. Such hints may be defined in an
attribute of the view state where the view state id itself is also
interpeted as a hint. A custom ValidationHintResolver can be plugged
in if necessary.
Issue: SWF-1453
Refactor JsfViewFactory to only attempt a restoreView when state is
available. This prevents a NullPointerException from being thrown
when using Mojarra with partial state saving disabled. This change
also makes Web Flow behave in a similar way to the standard
FacesServlet.
Issue: SWF-1571
Update SerializableListDataModel to extend the JSF ListDataModel
class. This is primarily to allow sorting operations to work with
PrimeFaces
Issue: SWF-1510
Recent updates to Mojarra added a SKIP_ITERATION hint when delivering
the PostRestoreStateEvent. Web Flow should follow the same logic.
Issue: SWF-1549
Moved all non-java files from src/main/java to src/main/resources.
Primarily to ensure resources are packaged into released jars but
also to conform with standard layout conventions.
Introduce PortletFacesContextFactory that will be used to create the
FacesContext when running in a portlet environment. This moves logic
from the FacesContextHelper preventing the package tangle that would
otherwise occur.
The ResourcesBeanDefinitionParser will now automatically register an
additional portlet resource resolver when a portlet environment and
and relevant Spring portlet classes are detected.
Issues: SWF-1500
* Rework all state handling, removed FlowSerializedView class and save
state as opaque object
* Use FacesWrapper classes instead of custom delegates
* Deprecate isAtLeastJSFXXX() methods and removed all internal use
* Remove all Jsf2XXX versions of classes
* Refactor all calls to deprecated JSF methods
* Removed older VariableResolver and PropertyResolver classes
* Deprecate Jsf2FlowResourceResolver and log warning if used
* Create new FlowELResolver to replace removed VariableResolvers and
PropertyResolvers
* Update faces-config.xml to use newer xsd
* Significantly rework FlowFacesContext to remove the message delegate
and generally improve the code
* Added "provided" dependency to MyFaces and fixed partial state saving
on MyFaces
* Fixed FlowResourceResolver to delegate to both MyFaces or Mojarra
depending on availability
* Add JsfUtils.findFactory method and rework existing code to replace
FactoryFinder calls and casts
* Refactor JsfViewFactory to improve code readability
* Rename FlowViewStateManager and FlowViewResponseStateManager to
FlowStateManager and FlowResponseStateManager
* Ensure ResponseContextHolder is reset after each test
* Update JSF portlet support to function with JSF 2.0
Issue: SWF-1536, SWF-1540, SWF-1550
Reviewed and replaced when possible:
- new Integer
- intValue()
- new Boolean
- booleanValue()
- Boolean.TRUE
- Boolean.FALSE
- new Long
- longValue()
Issues: SWF-1532
- Apply and use Generics
- Remove JdkVersion.isAtLeastJava15() conditionals
- Replace iterator loops with foreach syntax
- Switch on warning in eclipse
Issues: SWF-1532
Previously we checked the "Faces-Request" header only.
Now we try to delegate the call to
PartialViewContext.isAjaxRequest() first. If a FacesContext
is unavailble for some reason we also check the
"javax.faces.partial.ajax" request parameter.
A PostRestoreStateEvent should be delivered whenever a JSF view is
restored. Typically we rely on JSF to generate required events but
in this case since WebFlow handles the RESTORE_VIEW phase itself,
we need to deliver this event ourselves.
Issues: SWF-1500
For JSF 2.0.x Spring Web Flow the view root could not be preserved
across redirects in the same state (e.g. following validation)
because a JSF state saving listener held on to the FacesContext,
which Web Flow releases before the redirect.
This issue was addressed in JSF 2.1
http://java.net/jira/browse/JAVASERVERFACES-1604
which means we can allow the view root to survive the redirect.
Note that the behavior can also be controlled with the
redirect-in-same state flow execution attribute.
Issues: SWF-1502
Previously Web Flow's BindingResult implementation distinguished
object from field-level errors by checking if the source of the
error is null or otherwise a String. However, class-level bean
validation errors have a field source represented by an empty
String. After this change object and field-level errors are
recognized by checking for String-based field source that is
neither null nor empty.
This commit also contains a fix for spring-faces tests where
in JSF 2.1 the presence of an unreleased FacesContext may
cause some tests to fail.
Previously isValidationFailed() merely delegated to the wrapped
FacesContext ignoring any errors that may have been added to
Web Flow's MessageContext. After the change isValidationFailed()
checks and returns true if the MessageContext contains errors
or otherwise it delegates.
Issues: SWF-1490