Examples of QueueRegistry


Examples of org.richfaces.component.QueueRegistry

            return;
        }

        UIComponent comp = event.getComponent();
        String queueName = getQueueName(context, comp);
        QueueRegistry queueRegistry = QueueRegistry.getInstance(context);

        if (event instanceof PostAddToViewEvent) {
            queueRegistry.addQueue(queueName, comp);
            addQueueResourceComponent(context);
        } else if (event instanceof PreRemoveFromViewEvent) {
            queueRegistry.removeQueue(queueName);
        }
    }
View Full Code Here

Examples of org.richfaces.component.QueueRegistry

        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) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.