}
protected void encodeScript(FacesContext context, SelectCheckboxMenu menu) throws IOException {
String clientId = menu.getClientId(context);
WidgetBuilder wb = getWidgetBuilder(context);
wb.initWithDomReady("SelectCheckboxMenu", menu.resolveWidgetVar(), clientId)
.callback("onShow", "function()", menu.getOnShow())
.callback("onHide", "function()", menu.getOnHide())
.attr("scrollHeight", menu.getScrollHeight(), Integer.MAX_VALUE)
.attr("appendTo", SearchExpressionFacade.resolveComponentForClient(context, menu, menu.getAppendTo()), null);
if(menu.isFilter()) {
wb.attr("filter", true)
.attr("filterMatchMode", menu.getFilterMatchMode(), null)
.nativeAttr("filterFunction", menu.getFilterFunction(), null)
.attr("caseSensitive", menu.isCaseSensitive(), false);
}
wb.attr("panelStyle", menu.getPanelStyle(), null).attr("panelStyleClass", menu.getPanelStyleClass(), null);
encodeClientBehaviors(context, menu);
wb.finish();
}