}
}
}
AjaxContext ajaxContext = AjaxContext.getCurrentInstance();
ajaxContext.addRegionsFromComponent(component);
ajaxContext.addComponentToAjaxRender(component);
ajaxContext.addRegionsFromComponent(component);
ajaxContext.addRenderedArea(clientId + ":tb");
// FIXME: check for correct client id.
// Now path & client id mixed here, it is possible that
// they will be different un case of dataTable in dataTable.
// Due to we are re render whole data table, Ajax runtime didn't add to reRender
// ids of those childs that specified in reRender data table attribute
// so let's add them to ajax render areas here by hand
Set<String> ajaxRenderedAreas = ajaxContext.getAjaxRenderedAreas();
Set<String> areasToRender = ajaxContext.getAjaxAreasToRender();
for (String area : areasToRender) {
// process only child components, all other should be added to render
// automatically by ajax
if (area.startsWith(NamingContainer.SEPARATOR_CHAR + clientId)) {
area = area.substring(1); // remove unnecessary start separator symbol
if (!area.equals(clientId) && !ajaxRenderedAreas.contains(area)) {
ajaxContext.addRenderedArea(area);
}
}
}
}
}