if(!isWidgetSupported(protocol)) {
return;
}
SlideshowAttributes slideshowAttributes = (SlideshowAttributes) attributes;
isRendering = false;
protocol.writeCloseDiv(slideshowDivAttributes);
if (itemDisplayId == null) {
scriptWriter.write("null");
} else {
scriptWriter.write(createJavaScriptString(itemDisplayId));
addUsedWidgetId(itemDisplayId);
itemDisplayId = null;
}
// Render reference to gallery items
String itemsId = slideshowAttributes.getItems();
if (itemsId == null) {
itemsId = protocol.getMarinerPageContext().generateFCID("GALLERY_ITEMS");
}
scriptWriter.write(",items:" + createJavaScriptString(itemsId));
addUsedWidgetId(itemsId);
// Render the autoPlay option.
// The default value for autoPlay option in JavaScript is true,
// so there's no need to render anything if case the value of the
// style property is 'yes'.
if (slideshowAttributes.getStyles().getPropertyValues().getComputedValue(StylePropertyDetails.MCS_AUTO_PLAY) == StyleKeywords.NO) {
scriptWriter.write(",autoPlay:false");
}
// Extract style values and render them into JavaScript
StylesExtractor stylesExtractor = createStylesExtractor(protocol, slideshowAttributes.getStyles());
scriptWriter.write(",order:" + createJavaScriptString(stylesExtractor.getItemsOrder()));
int repetitions = stylesExtractor.getRepetitions();
scriptWriter.write(",repetitions:" + ((repetitions == Integer.MAX_VALUE)