Package org.openfaces.component

Examples of org.openfaces.component.LoadingMode


        if (AjaxUtil.getSkipExtraRenderingOnPortletsAjax(context))
            return;
        ResponseWriter writer = context.getResponseWriter();
        LayeredPane layeredPane = (LayeredPane) component;

        LoadingMode loadingMode = layeredPane.getLoadingMode();
        if (LoadingMode.AJAX_LAZY.equals(loadingMode) || LoadingMode.AJAX_ALWAYS.equals(loadingMode))
            AjaxUtil.prepareComponentForAjax(context, component);

        List<SubPanel> allItems = layeredPane.getSubPanels(true);
View Full Code Here


            FacesContext context,
            LayeredPane layeredPane,
            String containerClass,
            List<SubPanel> allItems
    ) throws IOException {
        LoadingMode loadingMode = layeredPane.getLoadingMode();

        ScriptBuilder sb = new ScriptBuilder();
        sb.initScript(context, layeredPane, "O$.LayeredPane._init",
                Rendering.getRolloverClass(context, layeredPane),
                containerClass,
View Full Code Here

    }

    private void renderInitScript(FacesContext context, UIComponent component) throws IOException {
        FoldingPanel foldingPanel = (FoldingPanel) component;

        LoadingMode loadingMode = foldingPanel.getLoadingMode();
        String defaultClass = Styles.getCSSClass(context, foldingPanel, Rendering.DEFAULT_FOCUSED_STYLE, StyleGroup.selectedStyleGroup(0));
        String focusedClass = Styles.getCSSClass(context,
                foldingPanel,
                foldingPanel.getFocusedStyle(), StyleGroup.selectedStyleGroup(1), foldingPanel.getFocusedClass(), defaultClass);
        String focusedContentClass = Styles.getCSSClass(context, foldingPanel,
View Full Code Here

        int selectedTabIndex = getSelectedIndex(container, subPanels);
        if (selectedTabIndex == -1)
            return; // if there are no rendered items

        LoadingMode loadingMode = container.getLoadingMode();
        if (loadingMode.equals(LoadingMode.SERVER)) {
            encodePageContent(context, container, subPanels, selectedTabIndex, true, containerClass);
            container.setItemRendered(selectedTabIndex, true);
        } else if (loadingMode.equals(LoadingMode.CLIENT)) {
            for (int i = 0; i < allItemCount; i++) {
                boolean thisPageVisible = selectedTabIndex == i;
                SubPanel subPanel = subPanels.get(i);
                if (subPanel.isRendered())
                    encodePageContent(context, container, subPanels, i, thisPageVisible, containerClass);
                container.setItemRendered(i, true);
            }
        } else if (loadingMode.equals(LoadingMode.AJAX_LAZY)) {
            encodePageContent(context, container, subPanels, selectedTabIndex, true, containerClass);
            container.setItemRendered(selectedTabIndex, true);
        } else if (loadingMode.equals(LoadingMode.AJAX_ALWAYS)) {
            encodePageContent(context, container, subPanels, selectedTabIndex, true, containerClass);
            container.setItemRendered(selectedTabIndex, true);
        } else
            throw new IllegalStateException("Invalid loading mode: " + loadingMode);
    }
View Full Code Here

        if (AjaxUtil.getSkipExtraRenderingOnPortletsAjax(context))
            return;
        ResponseWriter writer = context.getResponseWriter();
        TabbedPane tabbedPane = (TabbedPane) component;

        LoadingMode loadingMode = tabbedPane.getLoadingMode();
        if (LoadingMode.AJAX_LAZY.equals(loadingMode) || LoadingMode.AJAX_ALWAYS.equals(loadingMode))
            AjaxUtil.prepareComponentForAjax(context, component);

        List<SubPanel> allSubPanels = tabbedPane.getSubPanels(true);
View Full Code Here

        } else {
            defaultBorderClass = DEFAULT_BORDER_CLASS_PREFIX + tabPlacement;
        }
        String borderClass = Styles.getCSSClass(context, tabbedPane, fullBorderStyle, defaultBorderClass);

        LoadingMode loadingMode = tabbedPane.getLoadingMode();

        String focusedClass = Styles.getCSSClass(context, tabbedPane,
                tabbedPane.getFocusedStyle(), StyleGroup.selectedStyleGroup(1), tabbedPane.getFocusedClass(), null);

        ScriptBuilder sb = new ScriptBuilder();
View Full Code Here

TOP

Related Classes of org.openfaces.component.LoadingMode

Copyright © 2018 www.massapicom. 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.