Commit Graph

135 Commits

Author SHA1 Message Date
Rossen Stoyanchev
b51b30ed01 Upgrade to Spring Security 4 and Spring Framework 4.1
Issue: SWF-1657, SWF-1663
2015-06-04 15:18:28 -04:00
Andy Wilkinson
78e02ea6c1 Upgrade to Mojarra 2.2.10
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.
2015-03-03 16:23:00 +00:00
Rossen Stoyanchev
1c67a0dc08 Revert "Prevent NPE in Mojarra when creating initial view"
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
2014-05-20 16:19:14 -04:00
Rossen Stoyanchev
cce1515a17 Support providing validator in faces builder serivces
Issue: SWF-1494
2014-03-31 17:28:31 -04:00
Rossen Stoyanchev
921220be27 Add Java config option for configuring Spring Web Flow
Issue: SWF-1548
2014-02-25 21:34:10 -05:00
Rossen Stoyanchev
217f838008 Upgrade Mojara to version 2.2.4
Issue: SWF-1613
2013-12-20 14:54:39 -05:00
Phillip Webb
787fb7dc89 Fix issue with RichFaces file upload
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
2013-01-29 09:55:56 -05:00
Rossen Stoyanchev
508d6a7dfb Add support for partial JSR-303 bean validation
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
2012-11-29 17:24:31 -05:00
Phillip Webb
d31900e5f9 Prevent NPE in Mojarra when creating initial view
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
2012-11-16 14:18:53 -08:00
Phillip Webb
2dea6c426a Remove legacy code following JSF 2.0 migration
- Remove JSF 1.2 components including ui package, faces-config.xml
  references and tld files
- Remove AjaxViewRoot class
- Polish JavaDocs

Issues: SWF-1536
2012-06-27 14:07:44 -07:00
Phillip Webb
d904786083 Modify <faces:resources> to add portlet variant
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
2012-06-18 19:08:58 -04:00
Phillip Webb
706490c4dc Upgrade spring-faces to JSF 2 as a minimum requirement
* 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
2012-06-13 19:39:10 -04:00
Rossen Stoyanchev
a770fa3492 Rename a couple of test classes to match convention 2012-05-25 16:54:15 -04:00
Rossen Stoyanchev
4e81930b72 Add Gradle build
- Add gradle build script
- Remove spring-build/
- Remove build-spring-webflow/
- Remove ivy.xml, pom.xml, template.mf
- Remove eclipse  metadata
- Remove RichFacesAjaxHandler.java
- Create src/dist and add changelog.txt, readme.txt

Dependency changes:
- EBR dependency -> Maven-central dependencies
- el-api 1.0 -> 2.2.0
- ognl 2.6.9 -> 2.6.11
- org.jboss.el -> tomcat-jasper-el 7.0.27
2012-05-25 16:54:15 -04:00
Phillip Webb
54a300e009 Change signatures to make use of Java 5 varargs
Issues: SWF-1532
2012-04-05 16:23:38 -07:00
Phillip Webb
22b018e95a Make use of Java 5 auto boxing
Reviewed and replaced when possible:
- new Integer
- intValue()
- new Boolean
- booleanValue()
- Boolean.TRUE
- Boolean.FALSE
- new Long
- longValue()

Issues: SWF-1532
2012-04-05 14:07:58 -07:00
Phillip Webb
3f1c40188c Update dates in copyright notice to 2004-2012
Issues: SWF-1532
2012-04-05 10:39:26 -07:00
Phil Webb
4d008f3f09 Refactor code to use Java 5 features
- Apply and use Generics
- Remove JdkVersion.isAtLeastJava15() conditionals
- Replace iterator loops with foreach syntax
- Switch on warning in eclipse

Issues: SWF-1532
2012-03-29 21:02:07 -07:00
Phil Webb
27cd5cca31 Add support for PostRestoreStateEvent
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
2012-03-06 17:20:55 -05:00
Rossen Stoyanchev
63151acb8d Minor fix in FlowPartialViewContext
The fix ensures that getRenderIds returns a mutable collection as
stated in the contract for the method in PartialViewContext.

Issues: SWF-1480
2012-02-29 12:21:07 -05:00
Rossen Stoyanchev
df649084ab Fix for bean validation messages in BindingResult
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.
2012-02-28 13:27:16 -05:00
Rossen Stoyanchev
85d8d73c1d Update Jsf2FlowFacesContext.isValidationFailed()
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
2012-02-28 10:47:47 -05:00
Phil Webb
962b123d73 Ensure required test directory is created in GIT and remove javadoc refs to missing home dir 2012-01-18 17:57:36 -05:00
Rossen Stoyanchev
ed76ec0485 SWF-1424 Add Web Flow implementation of PartialViewContext to support render action in JSF 2 applications. 2011-02-20 21:32:19 +00:00
Rossen Stoyanchev
1683f8c891 SWF-1435 Add top level pom.xml and Maven settings for verifying Maven configuration 2010-12-07 16:09:18 +00:00
Rossen Stoyanchev
8a4038ac13 SWF-1432 Make sure content type is set when sending a redirect instruction during JSF Ajax request 2010-12-03 14:51:45 +00:00
Rossen Stoyanchev
df7f3406a0 SWF-1419 Add ability to plug in custom Spring Validator via FlowBuilderServices to support JSR-303 validation 2010-12-02 13:54:00 +00:00
Rossen Stoyanchev
e70bca23fb SWF-1406 Fix regression in iterating faces messages 2010-10-27 08:01:40 +00:00
Rossen Stoyanchev
a89f24d954 Fix test setup issue 2010-09-15 08:47:46 +00:00
Rossen Stoyanchev
5d158abce7 SWF-1375 Add <faces:resources /> element, JsfFlowHandlerAdapter, and provide useful error message when FacesContext is null. 2010-09-14 12:26:24 +00:00
Rossen Stoyanchev
9e2137d3c6 SWF-1379 Remove dependency on the Portlet bridge for JSF and provide basic support within Web Flow for working Portlets and JSF. Update portlet samples 2010-09-13 14:57:14 +00:00
Rossen Stoyanchev
ce99354c42 SWF-1365 Missed a couple of files in last checkin. 2010-08-03 23:01:57 +00:00
Rossen Stoyanchev
6a56e9678a SWF-1365 Add support for partial state saving in JSF 2, ensure one FacesContext instance per request, avoid redirect by default when remaining in same view state (originally introduced in commit point 2365. 2010-08-03 11:15:20 +00:00
Rossen Stoyanchev
fe9229cf15 SWF-1367 Add support for JSF 2 Ajax requests, update booking-faces sample (JSF 2 based Ajax, jsr-303 validation), add chained delegation to AjaxHandlers, other miscellaneous improvements 2010-07-28 12:56:24 +00:00
Rossen Stoyanchev
f9f9fd094b SWF-1243 Comprehensive update to spring-faces for JSF 2.0 support 2010-06-02 19:48:10 +00:00
Rossen Stoyanchev
dcf9ad24b3 SWF-1245 Invoke after phase listeners in reverse order 2010-06-02 05:55:04 +00:00
Rossen Stoyanchev
0f84b153b5 SWF-1194 Upgrade to JSF 2 2010-05-17 10:23:15 +00:00
Rossen Stoyanchev
de75aefc63 SWF-1234 Integration with Spring 3 type conversion 2010-05-04 11:12:32 +00:00
Rossen Stoyanchev
7372b31184 SWF-1136 Make Spring EL the default expression language used. The current implementation is functionally equivalent except it ignores the configured Web Flow ConversionService and uses the Spring 3 conversion system instead. 2010-04-27 14:45:39 +00:00
Rossen Stoyanchev
5c5d1c322f SWF-1187 Applied patch attached to JIRA issue, polished unit test a little, and did some testing. 2010-04-07 18:52:27 +00:00
Jeremy Grelle
c7768ed617 Proper handling of AjaxViewRoot in JsfView.saveState 2009-04-17 20:14:09 +00:00
Jeremy Grelle
e1cbf8de97 Cleanup 2009-04-14 13:31:55 +00:00
Jeremy Grelle
84abdc9175 Adjusting JSF implementation to the refactored View interface. 2009-04-13 22:50:21 +00:00
Keith Donald
58c0e474bf userEventQueued; in progress, get method should not have side effects 2009-04-13 16:19:01 +00:00
Jeremy Grelle
b3399fd44b SWF-1055 - FlowFacesContext didn't expose context messages with null source 2009-03-13 17:42:06 +00:00
Keith Donald
16e88dcb6f numerous binding fixes, see changelog 2009-02-25 01:32:06 +00:00
Jeremy Grelle
1d979b7b2d SWF-856 - When using JSF getMaximumSeverity on the FlowFacesContext returns null even if a message has been added 2009-01-14 22:21:01 +00:00
Jeremy Grelle
1af29f45f1 SWF-1017 - FlowFacesContext does not return the same FacesMessages instances
SWF-985 - Multiple JSF validators duplicate messages
2009-01-14 21:33:36 +00:00
Jeremy Grelle
159cbd8403 SWF-963 - Render phase ignores facesContext.responseComplete 2008-12-09 20:14:27 +00:00
Jeremy Grelle
9b52a47d84 SWF-964 & SWF-839 - UI component state not being saved correctly across the redirect on recursive transitions 2008-12-09 19:21:20 +00:00