From 7507cda621944a62b41344530437f23aa49bfa72 Mon Sep 17 00:00:00 2001 From: Scott Andrews Date: Mon, 20 Oct 2008 15:29:41 +0000 Subject: [PATCH] SWF-916 AjaxTilesView fails for nested tiles-definition in case of an ajaxRequest Always add the current definition to the attribute map, even if it is a nested tiles definition. The mvc sample has been updated to use a nested tiles definition that is used for an ajax partial render. --- .../org/springframework/js/ajax/tiles2/AjaxTilesView.java | 4 +--- .../booking-mvc/src/main/webapp/WEB-INF/hotels/views.xml | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) 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 b9df7c60..b9abd689 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 @@ -121,12 +121,10 @@ public class AjaxTilesView extends TilesView { Attribute attr = (Attribute) compositeDefinition.getAttributes().get(key); Definition nestedDefinition = container.getDefinitionsFactory().getDefinition(attr.getValue().toString(), requestContext); + resultMap.put(key, attr); if (nestedDefinition != null) { flattenAttributeMap(container, requestContext, resultMap, nestedDefinition); - } else { - resultMap.put(key, attr); } - } } } 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..2cc6b8c4 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 @@ -10,7 +10,7 @@ - + @@ -22,4 +22,6 @@ + +