Commit Graph

414 Commits

Author SHA1 Message Date
Rossen Stoyanchev
0076cb5c53 Add cache to SelectionTrackingActionListener
Issue: SWF-1614
2013-12-18 16:18:08 -05:00
Rossen Stoyanchev
8729ffb5f3 Update changelog for 2.4 M1 release 2013-01-31 18:25:50 -05:00
Phillip Webb
0d17de3aad Ensure saveState() is always called
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
2013-01-30 13:56:24 -08: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
d6c0813b15 Upgrade Spring Framework and Spring Security
Spring Framework 3.1.1 -> 3.2.0
Spring Security  3.0.7 -> 3.1.3

Issue: SPR-1580, SPR-1581
2012-12-21 16:17:47 -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
47e6c00485 Polish 2012-11-16 13:43:41 -08:00
Phillip Webb
97cc86b7c1 SerializableListDataModel extends ListDataModel
Update SerializableListDataModel to extend the JSF ListDataModel
class. This is primarily to allow sorting operations to work with
PrimeFaces

Issue: SWF-1510
2012-11-15 11:36:29 -08:00
Phillip Webb
cd3d8be819 Skip iteration delivering PostRestoreStateEvent
Recent updates to Mojarra added a SKIP_ITERATION hint when delivering
the PostRestoreStateEvent.  Web Flow should follow the same logic.

Issue: SWF-1549
2012-11-14 17:44:12 -08:00
Phillip Webb
e2e5ee97d8 Additional FacesConversionService constructor
Add the inherited constructor allowing a delegate ConversionService
to be used

Issue: SWF-1562
2012-11-14 16:00:17 -08:00
Phillip Webb
c7ffb7a14a Moved non-java resources to src/main/resources
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.
2012-11-13 19:50:28 -08:00
Phillip Webb
313621b06c Polish package level Javadoc
Replace all package.html files with package-info.java
2012-11-13 19:38:21 -08:00
Phillip Webb
5a34fb15b4 Fix package tangle with portlets
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.
2012-11-12 17:28:10 -08:00
Rossen Stoyanchev
3917dc71a3 Add mapping to "/rfRes/**" for RichFaces resources
Issue: SWF-1473
2012-10-23 19:42:28 -04:00
Rossen Stoyanchev
1418d4ef91 Add 2.4 schemas 2012-10-23 19:42:28 -04:00
Rossen Stoyanchev
ffb8f30204 Avoid releasing FacesContext in PropertyAccessor
Issue: SWF-1558
2012-10-23 19:42:22 -04: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
4146871862 Add spring-js-resources to Gradle build 2012-05-25 16:54:15 -04:00
Rossen Stoyanchev
50a1cf1def Add reference docs tasks to Gradle build
- Move spring-webflow-reference to src/reference
- Upgrade to Docbook 5
- Apply docbook plugin
- Add tasks for generating distribution zip files
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
619249b52b Merge branch '2.3.x' 2012-03-27 18:02:45 -04:00
Rossen Stoyanchev
bca605d24a Spring Web Flow 2.3.1 release 2012-03-27 15:59:02 -04:00
Rossen Stoyanchev
dddcf7a258 Upgrade to Spring 3.1.1 2012-03-26 18:20:09 -04: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
Phil Webb
6a49144843 Ensure required test directory is created in GIT and remove javadoc refs to missing home dir 2012-01-17 17:00:41 -08:00
Rossen Stoyanchev
e5f17df95b Increment version to 2.3.1.BUILD-SNAPSHOT. 2011-12-29 13:24:39 -05:00
Rossen Stoyanchev
dc5aa386fa Increment version to 2.4.0.BUILD-SNAPSHOT. 2011-12-29 13:09:27 -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
1f988e0c57 Update template.mf files to Spring 3.0.5.RELEASE 2011-02-28 11:39:58 +00:00
Rossen Stoyanchev
3f8d0c8ba0 Update dependencies in web flow modules to Spring 3.0.5 2011-02-28 11:33:39 +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