* @return A merged templating model.
*/
public static Map<String, Object> getMergedModel(ExecutionContext executionContext) {
Map<String, Object> beans = executionContext.getBeanContext().getBeanMap();
Map<String, Object> model = beans;
DOMModel domModel = DOMModel.getModel(executionContext);
if(!domModel.getModels().isEmpty()) {
Map<String, ElementToNodeModel> elementToNodeModelMap = getElementToNodeModelMap(executionContext);
model = new HashMap<String, Object>();
model.putAll(beans);
Set<Map.Entry<String, Element>> models = domModel.getModels().entrySet();
for (Map.Entry<String, Element> entry : models) {
NodeModel nodeModel = getNodeModel(entry.getKey(), entry.getValue(), elementToNodeModelMap);
model.put(entry.getKey(), nodeModel);
}
}