For cases where isMyFacesInUse cannot properly detect due to issues in
dependent libraries (e.g. Tomahawk) we also check if Mojarra is
even present to strengthen those checks.
Issue: SWF-1687
The JSF com.sun.faces.facelets.tag.jsf.ComponentSupport in 2.2.7
started using FacesContext#isPostBack to check if a new component
tree is being built prior to attempting to find a child component.
In Web Flow where we redirect prior to rendering, and hence lose
the value of isPostback (because ResponseStateManagerImpl no longer
finds the parameter with the view state), it causes components to
be re-created and lose their local values.
This change overrides isPostback in FlowFacesContext in order to
return true in cases where the UIViewRoot has been restored from
flash scope and is fully built.
Issue: SWF-1645
Mojarra 2.2.10 generates responses that begin with an XML
declaration:
<?xml version='1.0' encoding='utf-8'?>
This change broke the expectation in JsfAjaxHandlerTests's
testSendAjaxRedirect. The test has been updated to expect the
XML declaration.
ResourcesBeanDefinitionParserTests has been updated to set up and
tear down the mock JDF infrastructure. This ensures that it does not
leave any side-effects that cause subsequent tests to fail on some
platforms.
Update JsfView so that state saving no longer occurs during
processUserEvent(). This is required to ensure that Mojarra's
StateContext.release(...) method is not called too early.
Prior to Mojarra 2.1.16 multiple calls to saveView had no side effects,
but the fix to JAVASERVERFACES-2609 changed this behavior.
In order to retain the fix for SWF-1577 the saveState() method is now
called from getUserEventState(). This should ensure that the
StateContext$AddRemoveListerner is still removed, even when WebFlow
bypasses the usual state saving for certain flow redirects.
Issue: SWF-1631
This reverts commit d31900e5f9.
The fix for SWF-1571 reported against Mojarra 2.1.8 seems to be
problematic when Web Flow's ResponseStateManager is not used as
reported in SWF-1630.
Testing with Mojarra 2.1.20 I can no longer reproduce SWF-1571
and originally it was suspected to be a Mojarra issue. Hence
this revert.
Issue: SWF-1571, SWF-1630
Before this change, SWF had its own faclets security tag library with
hierarchy root in AbstractAuthorizeTag.
As of this change SWF facelets security tag library inherits Spring SEC
AbstractAuthorizeTag instead, consolidating the two frameworks making
it easier to maintain, extend and reuse. This is made possible by
adding Spring security taglibs module as optional SWF facelets
dependecy. Because the dependency is optional, existing SWF facelets
security tag library users will have to explicitly add Spring Security
taglibs module as dependency.
Issue: SWF-1557
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.