}
Object ajaxResult = ajaxRequest.getAjaxResult();
ajaxResponse.setAjaxResult(ajaxResult);
ajaxResponse.setValidationError(ajaxRequest.isValidationError());
AjaxPluginIncludes availableIncludes = PluginsLoader.getAvailableIncludes(context);
List<String> foreignHeadScripts = availableIncludes.getScripts();
ajaxPrepareInitializationScripts(context, ajaxResponse, foreignHeadScripts, initializationScripts);
//todo: find component with inheader styles declaration and add corresponding functionality to AjaxPlugin(s)
addJSLibraries(context, ajaxResponse);
List<String> jsLibraries = availableIncludes.getJsIncludes();
if (jsLibraries != null)
addForeignJSLibraries(ajaxResponse, jsLibraries);
addStyles(context, ajaxResponse, components);
List<String> cssFiles = availableIncludes.getCssIncludes();
if (cssFiles != null) {
addForeignCSSFiles(ajaxResponse, cssFiles);
}
if (AjaxUtil.isPortletRequest(context)) {