if (!getBooleanConfigurationValue(context, CommonComponentsConfiguration.Items.queueEnabled)) {
return;
}
QueueRegistry registry = QueueRegistry.getInstance(context);
if (registry != null && registry.hasQueuesToEncode()) {
ResponseWriter writer = context.getResponseWriter();
writer.startElement(HtmlConstants.SCRIPT_ELEM, component);
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, component.getClientId(context), null);
writer.writeAttribute(HtmlConstants.TYPE_ATTR, HtmlConstants.JAVASCRIPT_TYPE, null);
writer.writeText(FUNCTION_NAME, null);
writer.writeText("({", null);
Map<String, Object> queueOptionsMap = new LinkedHashMap<String, Object>();
boolean isFirst = true;
Map<String, UIComponent> registeredQueues = registry.getRegisteredQueues();
for (Entry<String, UIComponent> queueEntry : registeredQueues.entrySet()) {
if (!queueEntry.getValue().isRendered()) {
break;
}
if (isFirst) {