diff --git a/spring-binding/.classpath b/spring-binding/.classpath
index 8cc43a52..0781f46a 100644
--- a/spring-binding/.classpath
+++ b/spring-binding/.classpath
@@ -12,9 +12,9 @@
-
-
-
+
+
+
diff --git a/spring-binding/ivy.xml b/spring-binding/ivy.xml
index d4f501f6..cfe7c0e6 100644
--- a/spring-binding/ivy.xml
+++ b/spring-binding/ivy.xml
@@ -23,9 +23,9 @@
-
-
-
+
+
+
diff --git a/spring-binding/pom.xml b/spring-binding/pom.xml
index b27e19aa..81d5bbfd 100644
--- a/spring-binding/pom.xml
+++ b/spring-binding/pom.xml
@@ -48,6 +48,6 @@
- 2.5.6.SEC01
+ 3.0.2.RELEASE
diff --git a/spring-binding/template.mf b/spring-binding/template.mf
index 5dcafb5c..2bb3b285 100644
--- a/spring-binding/template.mf
+++ b/spring-binding/template.mf
@@ -6,7 +6,7 @@ Import-Package:
ognl;version="[2.6.9, 3.0.0)";resolution:=optional,
org.jboss.el;version="[2.0.0, 3.0.0)";resolution:=optional
Import-Template:
- org.springframework.*;version="[2.5.6.SEC01, 3.1.0)",
+ org.springframework.*;version="[3.0.2.RELEASE, 3.1.0)",
org.apache.commons.logging;version="[1.1.1, 2.0.0)",
javax.el;version="[1.0.0, 2.0.0)";resolution:=optional,
ognl;version="[2.6.9, 3.0.0)";resolution:=optional,
diff --git a/spring-faces/.classpath b/spring-faces/.classpath
index eefca114..559467fa 100644
--- a/spring-faces/.classpath
+++ b/spring-faces/.classpath
@@ -23,11 +23,11 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/spring-faces/ivy.xml b/spring-faces/ivy.xml
index c8ff9171..43f540f7 100644
--- a/spring-faces/ivy.xml
+++ b/spring-faces/ivy.xml
@@ -27,11 +27,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -50,7 +50,7 @@
-
+
diff --git a/spring-faces/pom.xml b/spring-faces/pom.xml
index ff3a2dc6..f85e0042 100644
--- a/spring-faces/pom.xml
+++ b/spring-faces/pom.xml
@@ -108,7 +108,7 @@
- 2.5.6.SEC01
+ 3.0.2.RELEASE
1.2_09
diff --git a/spring-faces/template.mf b/spring-faces/template.mf
index 6e5e113b..25f50c68 100644
--- a/spring-faces/template.mf
+++ b/spring-faces/template.mf
@@ -8,7 +8,7 @@ Import-Template:
org.springframework.binding.*;version="[2.1.0, 2.1.1)",
org.springframework.js.*;version="[2.1.0, 2.1.1)",
org.springframework.webflow.*;version="[2.1.0, 2.1.1)",
- org.springframework.*;version="[2.5.6.SEC01, 3.1.0)",
+ org.springframework.*;version="[3.0.2.RELEASE, 3.1.0)",
org.apache.commons.logging;version="[1.1.1, 2.0.0)",
javax.el;version="[1.0.0, 2.0.0)",
javax.servlet;version="[2.4.0, 3.0.0)",
diff --git a/spring-js/.classpath b/spring-js/.classpath
index 28f88900..997b014a 100644
--- a/spring-js/.classpath
+++ b/spring-js/.classpath
@@ -8,17 +8,20 @@
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/spring-js/ivy.xml b/spring-js/ivy.xml
index eb9499b8..664a8ac4 100644
--- a/spring-js/ivy.xml
+++ b/spring-js/ivy.xml
@@ -22,20 +22,21 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
diff --git a/spring-js/pom.xml b/spring-js/pom.xml
index 20019cb7..8ea3b25e 100644
--- a/spring-js/pom.xml
+++ b/spring-js/pom.xml
@@ -36,19 +36,25 @@
org.apache.tiles
tiles-api
- 2.0.5
+ 2.1.2.osgi
true
org.apache.tiles
tiles-core
- 2.0.5
+ 2.1.2
true
org.apache.tiles
tiles-jsp
- 2.0.5
+ 2.1.2
+ true
+
+
+ org.apache.tiles
+ tiles-servlet
+ 2.1.2
true
@@ -65,6 +71,6 @@
- 2.5.6.SEC01
+ 3.0.2.RELEASE
diff --git a/spring-js/src/main/java/org/springframework/js/ajax/tiles2/AjaxTilesView.java b/spring-js/src/main/java/org/springframework/js/ajax/tiles2/AjaxTilesView.java
index 06210138..dfdb33ac 100644
--- a/spring-js/src/main/java/org/springframework/js/ajax/tiles2/AjaxTilesView.java
+++ b/spring-js/src/main/java/org/springframework/js/ajax/tiles2/AjaxTilesView.java
@@ -16,8 +16,10 @@
package org.springframework.js.ajax.tiles2;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
+import java.util.Set;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
@@ -27,13 +29,14 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.tiles.Attribute;
import org.apache.tiles.AttributeContext;
import org.apache.tiles.Definition;
-import org.apache.tiles.Attribute.AttributeType;
-import org.apache.tiles.access.TilesAccess;
import org.apache.tiles.context.TilesRequestContext;
-import org.apache.tiles.definition.DefinitionsFactoryException;
+import org.apache.tiles.context.TilesRequestContextFactory;
import org.apache.tiles.impl.BasicTilesContainer;
+import org.apache.tiles.servlet.context.ServletTilesRequestContextFactory;
+import org.apache.tiles.servlet.context.ServletUtil;
import org.springframework.js.ajax.AjaxHandler;
import org.springframework.js.ajax.SpringJavascriptAjaxHandler;
+import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.web.servlet.support.JstlUtils;
import org.springframework.web.servlet.support.RequestContext;
@@ -55,8 +58,16 @@ public class AjaxTilesView extends TilesView {
private static final String FRAGMENTS_PARAM = "fragments";
+ private TilesRequestContextFactory tilesRequestContextFactory;
+
private AjaxHandler ajaxHandler = new SpringJavascriptAjaxHandler();
+ public void afterPropertiesSet() throws Exception {
+ super.afterPropertiesSet();
+ tilesRequestContextFactory = new ServletTilesRequestContextFactory();
+ tilesRequestContextFactory.init(new HashMap());
+ }
+
public AjaxHandler getAjaxHandler() {
return ajaxHandler;
}
@@ -71,8 +82,8 @@ public class AjaxTilesView extends TilesView {
ServletContext servletContext = getServletContext();
if (ajaxHandler.isAjaxRequest(request, response)) {
- String[] attrNames = getRenderFragments(model, request, response);
- if (attrNames.length == 0) {
+ String[] fragmentsToRender = getRenderFragments(model, request, response);
+ if (fragmentsToRender.length == 0) {
logger.warn("An Ajax request was detected, but no fragments were specified to be re-rendered. "
+ "Falling back to full page render. This can cause unpredictable results when processing "
+ "the ajax response on the client.");
@@ -80,7 +91,8 @@ public class AjaxTilesView extends TilesView {
return;
}
- BasicTilesContainer container = (BasicTilesContainer) TilesAccess.getContainer(servletContext);
+ BasicTilesContainer container = (BasicTilesContainer) ServletUtil.getCurrentContainer(request,
+ servletContext);
if (container == null) {
throw new ServletException("Tiles container is not initialized. "
+ "Have you added a TilesConfigurer to your web application context?");
@@ -89,26 +101,29 @@ public class AjaxTilesView extends TilesView {
exposeModelAsRequestAttributes(model, request);
JstlUtils.exposeLocalizationContext(new RequestContext(request, servletContext));
- TilesRequestContext tilesRequestContext = container.getContextFactory().createRequestContext(
- container.getApplicationContext(), new Object[] { request, response });
+ TilesRequestContext tilesRequestContext = tilesRequestContextFactory.createRequestContext(container
+ .getApplicationContext(), new Object[] { request, response });
Definition compositeDefinition = container.getDefinitionsFactory().getDefinition(getUrl(),
tilesRequestContext);
+
Map flattenedAttributeMap = new HashMap();
flattenAttributeMap(container, tilesRequestContext, flattenedAttributeMap, compositeDefinition, request,
response);
+ addRuntimeAttributes(container, flattenedAttributeMap, request, response);
// initialize the session before rendering any fragments. Otherwise views that require the session which has
// not otherwise been initialized will fail to render
request.getSession();
response.flushBuffer();
- for (int i = 0; i < attrNames.length; i++) {
- Attribute attributeToRender = (Attribute) flattenedAttributeMap.get(attrNames[i]);
+
+ for (int i = 0; i < fragmentsToRender.length; i++) {
+ Attribute attributeToRender = (Attribute) flattenedAttributeMap.get(fragmentsToRender[i]);
if (attributeToRender == null) {
- throw new ServletException("No tiles attribute with a name of '" + attrNames[i]
+ throw new ServletException("No tiles attribute with a name of '" + fragmentsToRender[i]
+ "' could be found for the current view: " + this);
} else {
- container.render(attributeToRender, response.getWriter(), new Object[] { request, response });
+ container.render(attributeToRender, new Object[] { request, response });
}
}
} else {
@@ -122,51 +137,67 @@ public class AjaxTilesView extends TilesView {
return StringUtils.trimArrayElements(renderFragments);
}
+ /**
+ *
+ * Iterate over all attributes in the given Tiles definition. Every attribute value that represents a template (i.e.
+ * start with "/") or is a nested definition is added to a Map. The method class itself recursively to traverse
+ * nested definitions.
+ *
+ *
+ * @param container the TilesContainer
+ * @param requestContext the TilesRequestContext
+ * @param resultMap the output Map where attributes of interest are added to.
+ * @param compositeDefinition the definition to search for attributes of interest.
+ * @param request the servlet request
+ * @param response the servlet response
+ */
protected void flattenAttributeMap(BasicTilesContainer container, TilesRequestContext requestContext,
- Map resultMap, Definition compositeDefinition, HttpServletRequest request, HttpServletResponse response)
- throws Exception {
- if (compositeDefinition.getAttributes() != null && compositeDefinition.getAttributes().size() > 0) {
- Iterator i = compositeDefinition.getAttributes().keySet().iterator();
- while (i.hasNext()) {
- Object key = i.next();
- Attribute attr = (Attribute) compositeDefinition.getAttributes().get(key);
- AttributeType attrType = attr.getType() != null ? attr.getType() : detectType(container,
- requestContext, attr);
- if (AttributeType.DEFINITION.equals(attrType) || AttributeType.TEMPLATE.equals(attrType)) {
- resultMap.put(key, attr);
- if (AttributeType.DEFINITION.equals(attrType)) {
- Definition nestedDefinition = container.getDefinitionsFactory().getDefinition(
- attr.getValue().toString(), requestContext);
- if (nestedDefinition != null && nestedDefinition != compositeDefinition) {
- flattenAttributeMap(container, requestContext, resultMap, nestedDefinition, request,
- response);
- }
- }
- }
+ Map resultMap, Definition compositeDefinition, HttpServletRequest request, HttpServletResponse response) {
+ Iterator iterator = compositeDefinition.getAttributeNames();
+ while (iterator.hasNext()) {
+ String attributeName = (String) iterator.next();
+ Attribute attribute = compositeDefinition.getAttribute(attributeName);
+ if (attribute.getValue() == null || !(attribute.getValue() instanceof String)) {
+ continue;
+ }
+ String value = attribute.getValue().toString();
+ if (value.startsWith("/")) {
+ resultMap.put(attributeName, attribute);
+ } else if (container.isValidDefinition(value, new Object[] { request, response })) {
+ resultMap.put(attributeName, attribute);
+ Definition nestedDefinition = container.getDefinitionsFactory().getDefinition(value, requestContext);
+ Assert.isTrue(nestedDefinition != compositeDefinition, "Circular nested definition: " + value);
+ flattenAttributeMap(container, requestContext, resultMap, nestedDefinition, request, response);
}
- }
-
- // Process dynamic attributes
- AttributeContext attributeContext = container.getAttributeContext(new Object[] { request, response });
-
- for (Iterator i = attributeContext.getAttributeNames(); i.hasNext();) {
- String key = (String) i.next();
- Attribute attr = attributeContext.getAttribute(key);
- resultMap.put(key, attr);
}
}
- private AttributeType detectType(BasicTilesContainer container, TilesRequestContext requestContext, Attribute attr)
- throws DefinitionsFactoryException {
- if (attr.getValue() instanceof String) {
- if (container.getDefinitionsFactory().getDefinition(attr.getValue().toString(), requestContext) != null) {
- return AttributeType.DEFINITION;
- } else if (attr.getValue().toString().startsWith("/")) {
- return AttributeType.TEMPLATE;
- } else {
- return AttributeType.STRING;
- }
+ /**
+ *
+ * Iterate over dynamically added Tiles attributes (see "Runtime Composition" in the Tiles documentation) and add
+ * them to the output Map passed as input.
+ *
+ *
+ * @param container the Tiles container
+ * @param resultMap the output Map where attributes of interest are added to.
+ * @param request the Servlet request
+ * @param response the Servlet response
+ */
+ protected void addRuntimeAttributes(BasicTilesContainer container, Map resultMap, HttpServletRequest request,
+ HttpServletResponse response) {
+ AttributeContext attributeContext = container.getAttributeContext(new Object[] { request, response });
+ Set attributeNames = new HashSet();
+ if (attributeContext.getLocalAttributeNames() != null) {
+ attributeNames.addAll(attributeContext.getLocalAttributeNames());
+ }
+ if (attributeContext.getCascadedAttributeNames() != null) {
+ attributeNames.addAll(attributeContext.getCascadedAttributeNames());
+ }
+ Iterator iterator = attributeNames.iterator();
+ while (iterator.hasNext()) {
+ String name = (String) iterator.next();
+ Attribute attr = attributeContext.getAttribute(name);
+ resultMap.put(name, attr);
}
- return AttributeType.OBJECT;
}
}
diff --git a/spring-js/src/test/java/org/springframework/js/ajax/tiles2/AjaxTilesViewTests.java b/spring-js/src/test/java/org/springframework/js/ajax/tiles2/AjaxTilesViewTests.java
index 1b53f7a4..d1ea5804 100644
--- a/spring-js/src/test/java/org/springframework/js/ajax/tiles2/AjaxTilesViewTests.java
+++ b/spring-js/src/test/java/org/springframework/js/ajax/tiles2/AjaxTilesViewTests.java
@@ -6,10 +6,13 @@ import java.util.Map;
import junit.framework.TestCase;
import org.apache.tiles.Attribute;
+import org.apache.tiles.AttributeContext;
import org.apache.tiles.Definition;
-import org.apache.tiles.access.TilesAccess;
import org.apache.tiles.context.TilesRequestContext;
+import org.apache.tiles.context.TilesRequestContextFactory;
import org.apache.tiles.impl.BasicTilesContainer;
+import org.apache.tiles.servlet.context.ServletTilesRequestContextFactory;
+import org.apache.tiles.servlet.context.ServletUtil;
import org.springframework.js.ajax.SpringJavascriptAjaxHandler;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
@@ -36,6 +39,7 @@ public class AjaxTilesViewTests extends TestCase {
tc.setDefinitions(new String[] { "tiles-definitions.xml" });
tc.setValidateDefinitions(true);
tc.setServletContext(servletContext);
+ tc.setUseMutableTilesContainer(true);
tc.afterPropertiesSet();
ajaxTilesView = new AjaxTilesView();
@@ -52,6 +56,7 @@ public class AjaxTilesViewTests extends TestCase {
public void testFullPageRendering() throws Exception {
setupStaticWebApplicationContext();
ajaxTilesView.setUrl("search");
+ ajaxTilesView.afterPropertiesSet();
ajaxTilesView.renderMergedOutputModel(new HashMap(), request, response);
assertEquals("/WEB-INF/layout.jsp", response.getForwardedUrl());
}
@@ -60,6 +65,7 @@ public class AjaxTilesViewTests extends TestCase {
setupStaticWebApplicationContext();
request.addHeader("Accept", SpringJavascriptAjaxHandler.AJAX_ACCEPT_CONTENT_TYPE);
ajaxTilesView.setUrl("search");
+ ajaxTilesView.afterPropertiesSet();
ajaxTilesView.renderMergedOutputModel(new HashMap(), request, response);
assertEquals("/WEB-INF/layout.jsp", response.getForwardedUrl());
}
@@ -69,6 +75,7 @@ public class AjaxTilesViewTests extends TestCase {
request.addHeader("Accept", SpringJavascriptAjaxHandler.AJAX_ACCEPT_CONTENT_TYPE);
request.addParameter("fragments", "searchResults");
ajaxTilesView.setUrl("search");
+ ajaxTilesView.afterPropertiesSet();
ajaxTilesView.renderMergedOutputModel(new HashMap(), request, response);
assertEquals("/WEB-INF/searchResults.jsp", response.getIncludedUrl());
}
@@ -78,21 +85,46 @@ public class AjaxTilesViewTests extends TestCase {
request.addHeader("Accept", SpringJavascriptAjaxHandler.AJAX_ACCEPT_CONTENT_TYPE);
request.addParameter("fragments", "body");
ajaxTilesView.setUrl("search");
+ ajaxTilesView.afterPropertiesSet();
ajaxTilesView.renderMergedOutputModel(new HashMap(), request, response);
assertEquals("/WEB-INF/search.jsp", response.getIncludedUrl());
}
+ public void testRenderFragment_CascadedAttribute() throws Exception {
+ setupStaticWebApplicationContext();
+ request.addHeader("Accept", SpringJavascriptAjaxHandler.AJAX_ACCEPT_CONTENT_TYPE);
+ request.addParameter("fragments", "searchNavigation");
+ ajaxTilesView.setUrl("search");
+ ajaxTilesView.afterPropertiesSet();
+ ajaxTilesView.renderMergedOutputModel(new HashMap(), request, response);
+ assertEquals("/WEB-INF/searchNavigation.jsp", response.getIncludedUrl());
+ }
+
+ public void testRenderFragment_DynamicAttribute() throws Exception {
+ BasicTilesContainer container = (BasicTilesContainer) ServletUtil.getCurrentContainer(request, servletContext);
+ Object[] requestItems = new Object[] { request, response };
+ AttributeContext attributeContext = container.startContext(requestItems);
+ attributeContext.putAttribute("body", new Attribute("/WEB-INF/dynamicTemplate.jsp"));
+ Map resultMap = new HashMap();
+ ajaxTilesView.addRuntimeAttributes(container, resultMap, request, response);
+ assertNotNull(resultMap.get("body"));
+ assertEquals("/WEB-INF/dynamicTemplate.jsp", resultMap.get("body").toString());
+ container.endContext(requestItems);
+ }
+
public void testFlattenAttributeMap() throws Exception {
- BasicTilesContainer container = (BasicTilesContainer) TilesAccess.getContainer(servletContext);
- TilesRequestContext tilesRequestContext = container.getContextFactory().createRequestContext(
- container.getApplicationContext(), new Object[] { request, response });
+ TilesRequestContextFactory tilesRequestContextFactory = new ServletTilesRequestContextFactory();
+ tilesRequestContextFactory.init(new HashMap());
+ BasicTilesContainer container = (BasicTilesContainer) ServletUtil.getCurrentContainer(request, servletContext);
+ TilesRequestContext tilesRequestContext = tilesRequestContextFactory.createRequestContext(container
+ .getApplicationContext(), new Object[] { request, response });
Definition compositeDefinition = container.getDefinitionsFactory().getDefinition("search", tilesRequestContext);
Map resultMap = new HashMap();
ajaxTilesView.flattenAttributeMap(container, tilesRequestContext, resultMap, compositeDefinition, request,
response);
assertNotNull(resultMap.get("body"));
assertNotNull(resultMap.get("searchForm"));
- assertEquals("/WEB-INF/searchForm.jsp", ((Attribute) resultMap.get("searchForm")).getValue());
+ assertEquals("/WEB-INF/searchForm.jsp", resultMap.get("searchForm").toString());
assertNotNull(resultMap.get("searchResults"));
}
diff --git a/spring-js/src/test/java/org/springframework/js/ajax/tiles2/tiles-definitions.xml b/spring-js/src/test/java/org/springframework/js/ajax/tiles2/tiles-definitions.xml
index a61c4b17..f9207c5c 100644
--- a/spring-js/src/test/java/org/springframework/js/ajax/tiles2/tiles-definitions.xml
+++ b/spring-js/src/test/java/org/springframework/js/ajax/tiles2/tiles-definitions.xml
@@ -1,15 +1,16 @@
+ "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
+ "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
-
+
+
diff --git a/spring-js/template.mf b/spring-js/template.mf
index fa3ba868..2f3a77c6 100644
--- a/spring-js/template.mf
+++ b/spring-js/template.mf
@@ -3,12 +3,13 @@ Bundle-Name: Spring JS
Bundle-Vendor: SpringSource
Bundle-ManifestVersion: 2
Import-Template:
- org.springframework.*;version="[2.5.6.SEC01, 3.1.0)",
+ org.springframework.*;version="[3.0.2.RELEASE, 3.1.0)",
org.apache.commons.logging;version="[1.1.1, 2.0.0)",
javax.servlet;version="[2.4.0, 3.0.0)",
javax.servlet.http;version="[2.4.0, 3.0.0)",
- org.apache.tiles;version="[2.0.5, 3.0.0)";resolution:=optional,
- org.apache.tiles.access;version="[2.0.5, 3.0.0)";resolution:=optional,
- org.apache.tiles.context;version="[2.0.5.osgi, 3.0.0)";resolution:=optional,
- org.apache.tiles.definition;version="[2.0.5.osgi, 3.0.0)";resolution:=optional,
- org.apache.tiles.impl;version="[2.0.5.osgi, 3.0.0)";resolution:=optional
+ org.apache.tiles;version="[2.1.2, 3.0.0)";resolution:=optional,
+ org.apache.tiles.access;version="[2.1.2, 3.0.0)";resolution:=optional,
+ org.apache.tiles.context;version="[2.1.2.osgi, 3.0.0)";resolution:=optional,
+ org.apache.tiles.definition;version="[2.1.2.osgi, 3.0.0)";resolution:=optional,
+ org.apache.tiles.impl;version="[2.1.2.osgi, 3.0.0)";resolution:=optional,
+ org.apache.tiles.servlet.context;version="[2.1.2, 3.0.0)";resolution:=optional
diff --git a/spring-webflow-samples/booking-faces/ivy.xml b/spring-webflow-samples/booking-faces/ivy.xml
index 99e25489..9063c6ee 100755
--- a/spring-webflow-samples/booking-faces/ivy.xml
+++ b/spring-webflow-samples/booking-faces/ivy.xml
@@ -33,15 +33,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -50,7 +50,7 @@
-
+
diff --git a/spring-webflow-samples/booking-faces/pom.xml b/spring-webflow-samples/booking-faces/pom.xml
index 1b03d9f0..b750f308 100644
--- a/spring-webflow-samples/booking-faces/pom.xml
+++ b/spring-webflow-samples/booking-faces/pom.xml
@@ -196,7 +196,7 @@
- 2.5.6.SEC01
+ 3.0.2.RELEASE
1.2.0.09
diff --git a/spring-webflow-samples/booking-mvc/ivy.xml b/spring-webflow-samples/booking-mvc/ivy.xml
index b36ed536..2e2c0c03 100755
--- a/spring-webflow-samples/booking-mvc/ivy.xml
+++ b/spring-webflow-samples/booking-mvc/ivy.xml
@@ -28,24 +28,25 @@
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -54,7 +55,7 @@
-
+
diff --git a/spring-webflow-samples/booking-mvc/pom.xml b/spring-webflow-samples/booking-mvc/pom.xml
index 194db40d..522bd9b9 100644
--- a/spring-webflow-samples/booking-mvc/pom.xml
+++ b/spring-webflow-samples/booking-mvc/pom.xml
@@ -35,17 +35,22 @@
org.apache.tiles
com.springsource.org.apache.tiles
- 2.0.5
+ 2.1.2.osgi
org.apache.tiles
com.springsource.org.apache.tiles.core
- 2.0.5.osgi
+ 2.1.2.osgi
org.apache.tiles
com.springsource.org.apache.tiles.jsp
- 2.0.5
+ 2.1.2
+
+
+ org.apache.tiles
+ com.springsource.org.apache.tiles.servlet
+ 2.1.2
org.hibernate
@@ -206,6 +211,6 @@
- 2.5.6.SEC01
+ 3.0.2.RELEASE
diff --git a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/webmvc-config.xml b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/webmvc-config.xml
index 33474922..7b85d66d 100644
--- a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/webmvc-config.xml
+++ b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/config/webmvc-config.xml
@@ -30,9 +30,7 @@
/WEB-INF/layouts/layouts.xml
- /WEB-INF/views.xml
- /WEB-INF/hotels/views.xml
- /WEB-INF/hotels/booking/views.xml
+ /WEB-INF/**/views.xml
diff --git a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/views.xml b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/views.xml
index 59e280ac..41acc432 100644
--- a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/views.xml
+++ b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/views.xml
@@ -1,17 +1,17 @@
+ "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
+ "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/views.xml b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/views.xml
index 6554cc01..0d354a32 100644
--- a/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/views.xml
+++ b/spring-webflow-samples/booking-mvc/src/main/webapp/WEB-INF/hotels/views.xml
@@ -1,25 +1,21 @@
+ "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
+ "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
+
diff --git a/spring-webflow-samples/booking-portlet-faces/ivy.xml b/spring-webflow-samples/booking-portlet-faces/ivy.xml
index 9fb621f1..aafd3538 100644
--- a/spring-webflow-samples/booking-portlet-faces/ivy.xml
+++ b/spring-webflow-samples/booking-portlet-faces/ivy.xml
@@ -24,7 +24,7 @@
-
+
@@ -35,22 +35,22 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/spring-webflow-samples/booking-portlet-faces/pom.xml b/spring-webflow-samples/booking-portlet-faces/pom.xml
index d455563e..33a02a67 100644
--- a/spring-webflow-samples/booking-portlet-faces/pom.xml
+++ b/spring-webflow-samples/booking-portlet-faces/pom.xml
@@ -142,7 +142,7 @@
javax.portlet
com.springsource.javax.portlet
- 1.0.0
+ 2.0.0
provided
@@ -191,7 +191,7 @@
- 2.5.6.SEC01
+ 3.0.2.RELEASE
1.2.0.09
diff --git a/spring-webflow-samples/booking-portlet-mvc/.classpath b/spring-webflow-samples/booking-portlet-mvc/.classpath
index bf86d96e..af5e02d3 100644
--- a/spring-webflow-samples/booking-portlet-mvc/.classpath
+++ b/spring-webflow-samples/booking-portlet-mvc/.classpath
@@ -7,7 +7,7 @@
-
+
diff --git a/spring-webflow-samples/booking-portlet-mvc/ivy.xml b/spring-webflow-samples/booking-portlet-mvc/ivy.xml
index 59252a0f..9222393f 100644
--- a/spring-webflow-samples/booking-portlet-mvc/ivy.xml
+++ b/spring-webflow-samples/booking-portlet-mvc/ivy.xml
@@ -23,7 +23,7 @@
-
+
@@ -35,22 +35,22 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/spring-webflow-samples/booking-portlet-mvc/pom.xml b/spring-webflow-samples/booking-portlet-mvc/pom.xml
index 471919f7..d54f3ec3 100644
--- a/spring-webflow-samples/booking-portlet-mvc/pom.xml
+++ b/spring-webflow-samples/booking-portlet-mvc/pom.xml
@@ -116,7 +116,7 @@
javax.portlet
com.springsource.javax.portlet
- 1.0.0
+ 2.0.0
provided
@@ -174,6 +174,6 @@
- 2.5.6.SEC01
+ 3.0.2.RELEASE
diff --git a/spring-webflow-samples/jsf-booking/ivy.xml b/spring-webflow-samples/jsf-booking/ivy.xml
index 4b3b5e46..2c7940dc 100644
--- a/spring-webflow-samples/jsf-booking/ivy.xml
+++ b/spring-webflow-samples/jsf-booking/ivy.xml
@@ -35,18 +35,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
diff --git a/spring-webflow-samples/jsf-booking/pom.xml b/spring-webflow-samples/jsf-booking/pom.xml
index 3b9ef58b..af54febf 100644
--- a/spring-webflow-samples/jsf-booking/pom.xml
+++ b/spring-webflow-samples/jsf-booking/pom.xml
@@ -160,7 +160,7 @@
- 2.5.6.SEC01
+ 3.0.2.RELEASE
1.2.0.09
diff --git a/spring-webflow/.classpath b/spring-webflow/.classpath
index bfd7db25..452a171d 100644
--- a/spring-webflow/.classpath
+++ b/spring-webflow/.classpath
@@ -10,7 +10,7 @@
-
+
@@ -34,17 +34,17 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/spring-webflow/ivy.xml b/spring-webflow/ivy.xml
index 3bd4de74..46ca2a32 100644
--- a/spring-webflow/ivy.xml
+++ b/spring-webflow/ivy.xml
@@ -22,7 +22,7 @@
-
+
@@ -30,14 +30,14 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -51,9 +51,9 @@
-
-
-
+
+
+
diff --git a/spring-webflow/pom.xml b/spring-webflow/pom.xml
index 5b34ae63..e8dc7119 100644
--- a/spring-webflow/pom.xml
+++ b/spring-webflow/pom.xml
@@ -134,6 +134,6 @@
- 2.5.6.SEC01
+ 3.0.2.RELEASE
diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/FlowHandlerAdapter.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/FlowHandlerAdapter.java
index 2f9c146c..ce0a9cee 100644
--- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/FlowHandlerAdapter.java
+++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/portlet/FlowHandlerAdapter.java
@@ -21,12 +21,16 @@ import java.util.Map;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
import javax.portlet.PortletModeException;
import javax.portlet.PortletRequest;
import javax.portlet.PortletResponse;
import javax.portlet.PortletSession;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;
@@ -151,6 +155,15 @@ public class FlowHandlerAdapter extends PortletContentGenerator implements Handl
}
}
+ public void handleEvent(EventRequest request, EventResponse response, Object handler) throws Exception {
+ throw new UnsupportedOperationException("Auto-generated method stub");
+ }
+
+ public ModelAndView handleResource(ResourceRequest request, ResourceResponse response, Object handler)
+ throws Exception {
+ throw new UnsupportedOperationException("Auto-generated method stub");
+ }
+
// subclassing hooks
protected void populateConveniencePortletProperties(PortletRequest request) {
diff --git a/spring-webflow/src/main/java/org/springframework/webflow/scope/AbstractWebFlowScope.java b/spring-webflow/src/main/java/org/springframework/webflow/scope/AbstractWebFlowScope.java
index 17211809..3421192f 100644
--- a/spring-webflow/src/main/java/org/springframework/webflow/scope/AbstractWebFlowScope.java
+++ b/spring-webflow/src/main/java/org/springframework/webflow/scope/AbstractWebFlowScope.java
@@ -63,14 +63,18 @@ public abstract class AbstractWebFlowScope implements Scope {
protected abstract MutableAttributeMap getScope() throws IllegalStateException;
/**
- * Always returns null as most Spring Web Flow scopes do not have obvious conversation ids.
- * Subclasses should override this method where conversation ids can be intelligently returned.
+ * Always returns null as most Spring Web Flow scopes do not have obvious conversation ids. Subclasses
+ * should override this method where conversation ids can be intelligently returned.
* @return always returns null
*/
public String getConversationId() {
return null;
}
+ public Object resolveContextualObject(String key) {
+ return null;
+ }
+
/**
* Will not register a destruction callback as Spring Web Flow does not support destruction of scoped beans.
* Subclasses should override this method where where destruction can adequately be accomplished.
diff --git a/spring-webflow/src/test/java/org/springframework/webflow/context/portlet/PortletRequestMapTests.java b/spring-webflow/src/test/java/org/springframework/webflow/context/portlet/PortletRequestMapTests.java
index 5c4a079f..15655037 100644
--- a/spring-webflow/src/test/java/org/springframework/webflow/context/portlet/PortletRequestMapTests.java
+++ b/spring-webflow/src/test/java/org/springframework/webflow/context/portlet/PortletRequestMapTests.java
@@ -67,12 +67,16 @@ public class PortletRequestMapTests extends TestCase {
public void testGetAttributeNames() {
request.setAttribute("Some key", "Some value");
- request.removeAttribute("javax.servlet.context.tempdir");
// perform test
Iterator names = tested.getAttributeNames();
assertNotNull("Null result unexpected", names);
assertTrue("More elements", names.hasNext());
- String name = (String) names.next();
- assertEquals("Some key", name);
+ while (names.hasNext()) {
+ String name = (String) names.next();
+ if ("Some key".equals(name)) {
+ return;
+ }
+ }
+ fail("Expected to find: 'Some key'");
}
}
\ No newline at end of file
diff --git a/spring-webflow/template.mf b/spring-webflow/template.mf
index 7e074f7e..af656e4f 100644
--- a/spring-webflow/template.mf
+++ b/spring-webflow/template.mf
@@ -5,10 +5,10 @@ Bundle-ManifestVersion: 2
Import-Template:
org.springframework.binding.*;version="[2.1.0, 2.1.1)",
org.springframework.js.*;version="[2.1.0, 2.1.1)",
- org.springframework.*;version="[2.5.6.SEC01, 3.1.0)",
- org.springframework.orm.*;version="[2.5.6.SEC01, 3.1.0)";resolution:=optional,
- org.springframework.transaction.*;version="[2.5.6.SEC01, 3.1.0)";resolution:=optional,
- org.springframework.web.portlet.*;version="[2.5.6.SEC01, 3.1.0)";resolution:=optional,
+ org.springframework.*;version="[3.0.2.RELEASE, 3.1.0)",
+ org.springframework.orm.*;version="[3.0.2.RELEASE, 3.1.0)";resolution:=optional,
+ org.springframework.transaction.*;version="[3.0.2.RELEASE, 3.1.0)";resolution:=optional,
+ org.springframework.web.portlet.*;version="[3.0.2.RELEASE, 3.1.0)";resolution:=optional,
org.springframework.security.*;version="[2.0.0, 3.0.0)";resolution:=optional,
org.apache.commons.logging;version="[1.1.1, 2.0.0)",
javax.servlet;version="[2.4.0, 3.0.0)",
@@ -16,7 +16,7 @@ Import-Template:
javax.el;version="[1.0.0, 2.0.0)";resolution:=optional,
edu.emory.mathcs.backport.java.util.concurrent.*;version="[3.0.0, 4.0.0)";resolution:=optional,
javax.persistence;version="[1.0.0, 2.0.0)";resolution:=optional,
- javax.portlet;version="[1.0.0, 2.0.0)";resolution:=optional,
+ javax.portlet;version="[2.0.0, 3.0.0)";resolution:=optional,
ognl;version="[2.6.9, 3.0.0)";resolution:=optional,
junit.framework;resolution:=optional;version="[3.8.2, 4.0.0)",
org.hibernate;resolution:=optional;version="[3.2.6.ga, 4.0.0)",