encodeScript(context, carousel);
}
private void encodeScript(FacesContext context, Carousel carousel) throws IOException{
String clientId = carousel.getClientId(context);
WidgetBuilder wb = getWidgetBuilder(context);
wb.init("Carousel", carousel.resolveWidgetVar(), clientId);
wb.attr("firstVisible", carousel.getFirstVisible(), 0)
.attr("circular", carousel.isCircular(), false)
.attr("vertical", carousel.isVertical(), false)
.attr("numVisible", carousel.getNumVisible(), 3)
.attr("autoplayInterval", carousel.getAutoPlayInterval(), 0)
.attr("dropDownTemplate", carousel.getDropdownTemplate(), null)
.attr("pageLinks", carousel.getPageLinks(), 3)
.attr("effect", carousel.getEffect(), null)
.attr("effectDuration", carousel.getEffectDuration(), Integer.MIN_VALUE)
.attr("easing", carousel.getEasing(), null);
wb.finish();
}