Examples of SwitchType


Examples of org.richfaces.component.SwitchType

    protected boolean isAjaxMode(UIComponent component) {
        if (isResourceMode(component)) {
            return false;
        }

        SwitchType mode = getModeOrDefault(component);

        if (mode == SwitchType.server) {
            throw new IllegalArgumentException("Progress bar doesn't support 'server' mode");
        }
View Full Code Here

Examples of org.richfaces.component.SwitchType

        }
        return value;
    }

    protected SwitchType getModeOrDefault(UIComponent component) {
        SwitchType mode = ((AbstractProgressBar) component).getMode();
        if (mode == null) {
            mode = SwitchType.DEFAULT;
        }
        return mode;
    }
View Full Code Here

Examples of org.richfaces.component.SwitchType

            String iconCollapsed = (String) getFirstNonEmptyAttribute("iconCollapsed", treeNode, tree);

            if (Strings.isNullOrEmpty(iconCollapsed) && Strings.isNullOrEmpty(iconExpanded)) {
                encodeIconForNodeState(context, tree, treeNode, nodeState, null);
            } else {
                SwitchType toggleType = getToggleTypeOrDefault(treeNode.findTreeComponent());

                if (toggleType == SwitchType.client || nodeState == TreeNodeState.collapsed) {
                    encodeIconForNodeState(context, tree, treeNode, TreeNodeState.collapsed, iconCollapsed);
                }
View Full Code Here

Examples of org.richfaces.component.SwitchType

        throws EnclosingFormRequiredException {

        UIComponent form = RendererUtils.getInstance().getNestingForm(context, component);

        // TODO nick -> nick - switchType checking can be harmful here
        SwitchType switchType = (SwitchType) component.getAttributes().get("switchType");
        boolean isSwitchTypeClient = SwitchType.client == switchType;

        if ((form == null) && !isSwitchTypeClient) {
            throw new EnclosingFormRequiredException(component.getClass().toString() + " (id=\"" + component.getId()
                + "\") did not find parent form.");
View Full Code Here

Examples of org.richfaces.ui.common.SwitchType

    /**
     * The switch type for this toggle panel: client, ajax (default), server
     */
    @Attribute(generate = false)
    public SwitchType getSwitchType() {
        SwitchType switchType = (SwitchType) getStateHelper().eval(Properties.switchType);
        if (switchType == null) {
            switchType = getParentPanel().getSwitchType();
        }
        if (switchType == null) {
            switchType = SwitchType.DEFAULT;
View Full Code Here

Examples of org.richfaces.ui.common.SwitchType

    /**
     * The switch mode when a panel is activated.  One of: "client", "server", "ajax". Default: "ajax"
     */
    @Attribute(generate = false)
    public SwitchType getSwitchType() {
        SwitchType switchType = (SwitchType) getStateHelper().eval(Properties.switchType);
        if (switchType == null) {
            switchType = getParentPanel().getSwitchType();
        }
        if (switchType == null) {
            switchType = SwitchType.DEFAULT;
View Full Code Here

Examples of org.richfaces.ui.common.SwitchType

        addOptionIfSetAndNotDefault("change", dashboard.getOnchange(), options);
        return options;
    }

    protected boolean isAjaxMode(AbstractDashboard component) {
        SwitchType mode = component.getSwitchType();
        return SwitchType.ajax.equals(mode) || null == mode;
    }
View Full Code Here

Examples of org.richfaces.ui.common.SwitchType

    /**
     * The switch mode when a panel is activated. One of: "client", "server", "ajax". Default: "ajax"
     */
    @Attribute(generate = false)
    public SwitchType getSwitchType() {
        SwitchType switchType = (SwitchType) getStateHelper().eval(PropertyKeys.switchType);
        if (switchType == null) {
            switchType = SwitchType.DEFAULT;
        }
        return switchType;
    }
View Full Code Here

Examples of org.richfaces.ui.common.SwitchType

    /**
     * The switch type for this toggle panel: client, ajax (default), server
     */
    @Attribute(generate = false)
    public SwitchType getSwitchType() {
        SwitchType switchType = (SwitchType) getStateHelper().eval(Properties.switchType);
        if (switchType == null) {
            switchType = getParentPanel().getSwitchType();
        }
        if (switchType == null) {
            switchType = SwitchType.DEFAULT;
View Full Code Here

Examples of org.richfaces.ui.common.SwitchType

        return options;
    }

    protected boolean isAjaxMode(AbstractVisualsearch component)
    {
        SwitchType mode = component.getSwitchType();
        return SwitchType.ajax.equals(mode) || null == mode;
    }
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.