public JSONObject encodeAjaxPortion(FacesContext context, UIComponent component, String portionName, JSONObject jsonParam) throws IOException {
if (!portionName.startsWith(PAGE_PORTION_NAME_PREFIX))
throw new IllegalArgumentException("Unknown portionName: " + portionName);
String pageIndexStr = portionName.substring(PAGE_PORTION_NAME_PREFIX.length());
int absolutePageIndex = Integer.parseInt(pageIndexStr);
MultiPageContainer container = (MultiPageContainer) component;
List subPanels = container.getSubPanels(true);
encodePageContent(context, container, subPanels, absolutePageIndex, false, null);
container.setItemRendered(absolutePageIndex, true);
return null;
}