protected void encodeScript(FacesContext context, SplitButton button) throws IOException {
String clientId = button.getClientId(context);
WidgetBuilder wb = getWidgetBuilder(context);
wb.initWithDomReady("SplitButton", button.resolveWidgetVar(), clientId);
wb.attr("appendTo", SearchExpressionFacade.resolveComponentForClient(context, button, button.getAppendTo()), null);
wb.finish();
}
protected String buildOnclick(FacesContext context, SplitButton button) throws IOException {
StringBuilder onclick = SharedStringBuilder.get(context, SB_BUILD_ONCLICK);
if(button.getOnclick() != null) {