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.
This commit is contained in:
Scott Andrews
2008-10-20 15:29:41 +00:00
parent db1f88c6f4
commit 7507cda621
2 changed files with 4 additions and 4 deletions

View File

@@ -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);
}
}
}
}

View File

@@ -10,7 +10,7 @@
</definition>
<definition name="index.body" template="/WEB-INF/hotels/index.jsp">
<put-attribute name="hotelSearchForm" value="/WEB-INF/hotels/hotelSearchForm.jsp" />
<put-attribute name="hotelSearchForm" value="hotels.searchForm" />
<put-attribute name="bookingsTable" value="/WEB-INF/hotels/bookingsTable.jsp" />
</definition>
@@ -22,4 +22,6 @@
<put-attribute name="body" value="/WEB-INF/hotels/show.jsp" />
</definition>
<definition name="hotels.searchForm" template="/WEB-INF/hotels/hotelSearchForm.jsp" />
</tiles-definitions>