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:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user