}
}
// Container container = Dispatcher.getInstance().getSystemHolder()
// .getContainer(containerId);
AjaxGUIAnswer aga = new AjaxGUIAnswer();
// // if the container asked for does not exist, do nothing
// if (containerId == null || containerId.equals("") || container ==
// null) {
// aga.setStatus("not found");
// return aga;
// }
ElementParameter elemParam = new DefaultElementParameter();
elemParam.setUser(u);
// The serviceMap could be set from the page
elemParam.setServices(serviceMap);
// if langId sent in use that, else it will default to users langId
if (null != langId) {
elemParam.setLangId(langId);
}
elemParam.setOverride(overRide);
// inputAttributes changed to tempAttributes to enable running right js
// initialisation on return
Map<String, String> html = new TreeMap<String, String>();
Map<String, String> js = new TreeMap<String, String>();
SystemHolder sh = Dispatcher.getInstance().getSystemHolder();
Container container = null;
if (containerIds != null) {
for (String containerId : containerIds) {
container = sh.getContainer(containerId);
html.put(containerId, container.getOutput(elemParam, OutputFormat.HTML));
js.put(containerId, container.getOutput(elemParam,
OutputFormat.JAVASCRIPT).replaceAll("inputAttributes", "tempAttributes"));
}
}
// aga.setHTML(container.getOutput(elemParam, OutputFormat.HTML)
// .replaceAll("inputAttributes", "tempAttributes"));
aga.setHTML(html);
// aga.setJs(container.getOutput(elemParam, OutputFormat.JAVASCRIPT)
// .replaceAll("inputAttributes", "tempAttributes"));
// aga.setJs(js.toString());
aga.setJs(js);
aga.setStatus("ok");
return aga;
}