// TODO - review
context.getPartialViewContext().getRenderIds().add(component.getClientId(context));
}
protected void encodeControl(FacesContext context, UIComponent component) throws IOException {
AbstractCollapsibleSubTableToggler toggleControl = (AbstractCollapsibleSubTableToggler) component;
AbstractCollapsibleSubTable subTable = findComponent(context, toggleControl);
if (subTable != null) {
boolean expanded = subTable.isExpanded();
ResponseWriter writer = context.getResponseWriter();
encodeControl(context, writer, toggleControl, expanded, true);
encodeControl(context, writer, toggleControl, !expanded, false);
JSFunction jsFunction = new JSFunction("new RichFaces.ui.CollapsibleSubTableToggler");
String toggleId = toggleControl.getClientId(context);
jsFunction.addParameter(toggleId);
Map<String, Object> options = encodeOptions(context, toggleControl, subTable);
jsFunction.addParameter(options);
writer.startElement(HtmlConstants.SCRIPT_ELEM, subTable);