Commit Graph

292 Commits

Author SHA1 Message Date
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
bcb5a8d2a7 Revert use of putAll for JSF spec compliance
Issues: SWF-1532
2012-04-12 17:48:49 -07: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
53384adca9 Update dates in copyright notice to 2004-2012
Issues: SWF-1532
2012-04-05 16:02:01 -07:00
Phillip Webb
34f4837ebd Replace use of Iterator with Java 5 foreach loops
Issues: SWF-1532
2012-04-05 15:52:09 -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
58936414e4 Replace StringBuffe with StringBuilder
Issues: SWF-1532
2012-04-05 10:48:49 -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
Rossen Stoyanchev
3b1af34482 Check request param to recognize JSF 2 Ajax requests
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.
2012-03-14 12:27:04 -04: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
8e1aa91b40 JSF view root to survive redirect in same state
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
2012-02-29 15:36:14 -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
Rossen Stoyanchev
f764120279 Upgrade JSF Mojarra to version 2.1.7 2012-02-27 17:06:33 -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
5b0cf929da SWF-1461 NPE when rendering a JSF view as part of non-webflow request. 2011-06-30 09:47:13 +00: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
5cb3ef0067 SWF-991, SWF-1413 - Add ajax-driven flow attribute and redirect-in-same-view-state flow execution attribute 2011-01-31 00:32:00 +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
155649fd40 SWF-1407 Update mvc.JsfView to re-use FacesContext if available such as when used from Web Flow 2010-10-27 08:48:02 +00:00
Rossen Stoyanchev
e70bca23fb SWF-1406 Fix regression in iterating faces messages 2010-10-27 08:01:40 +00:00
Rossen Stoyanchev
bc2ca0351c SWF-1402 Add missing delegation methods to FlowViewResponseStateManager and add check for Web Flow request i FlowRenderKit 2010-10-01 09:56:54 +00:00
Rossen Stoyanchev
7b2ab7587c Fixes after testing with Apache MyFaces 2 2010-09-21 12:10:47 +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
7fbc016215 SWF-1333 Create JSF 1.2 and 2.0 versions of the Spring Security tag library and remove springsecurity.taglib.xml 2010-09-02 17:56:16 +00:00
Rossen Stoyanchev
a5798b8ff7 Minor fix to ensure compilation with Java 1.5 JDK 2010-08-31 23:12:07 +00:00
Rossen Stoyanchev
d9fa61c892 SWF-1333 Add Spring Security facelets tag library 2010-08-31 10:12:15 +00:00
Rossen Stoyanchev
f3e613e7ad SWF-1383 Fix issue with processing during non-SWF requests 2010-08-25 15:19:19 +00:00
Rossen Stoyanchev
2fa0c6b930 SWF-1378 Create FlowResourceResolver for JSF 1.2 and 2.0 environments 2010-08-25 15:13:43 +00:00
Rossen Stoyanchev
6157e3dd5b SWF-1313 Honor disabled attribute by rendering a commandLink as a span element 2010-08-03 23:04:55 +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
507fec3edf SWF-1366 Add RequestHandler for JSF resource requests and update sample config 2010-07-22 11:39:32 +00:00
Rossen Stoyanchev
98dbf4b5a8 SWF-1263 Split out a JSF 2 specific version of FlowFacesContext 2010-07-14 10:18:47 +00:00
Rossen Stoyanchev
50cd595762 SWF-1261 Move methods that belong to FlowApplication from Jsf2FlowApplication 2010-06-24 16:29:11 +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