private static final Log log = LogFactory.getLog(TabPanelsRenderer.class);
@Override
public void decode(FacesContext facesContext, UIComponent component) {
TabPanelsComponent tabPanelsComponent = (TabPanelsComponent) component;
if(isSubmitted(facesContext,component)){
Map paramMap = facesContext.getExternalContext().getRequestParameterMap();
String clientId = component.getClientId(facesContext);
if (paramMap.containsKey(clientId)) {
String index = (String) paramMap.get(clientId);
tabPanelsComponent.setSelectedIndex(Integer.parseInt(index));
}
}
}