Map<String, String> requestMap = context.getExternalContext().getRequestParameterMap();
AbstractTab tab = (AbstractTab) component;
String compClientId = component.getClientId(context);
AbstractTabPanel parentTabPanel = getParentTabPanel(tab);
PartialViewContext pvc = context.getPartialViewContext();
if (pvc.isPartialRequest()) {
// encode the tabPanel headers when the tab is encoded
String headerMetaComponentId = parentTabPanel.getClientId(context)
+ MetaComponentResolver.META_COMPONENT_SEPARATOR_CHAR
+ AbstractTabPanel.HEADER_META_COMPONENT;
pvc.getRenderIds().add(headerMetaComponentId);
}
if (requestMap.get(compClientId) != null) {
if (parentTabPanel.isImmediate()) {
tab.setImmediate(true);
}
new ActionEvent(tab).queue();
}
}