Package org.richfaces.component

Examples of org.richfaces.component.AbstractTreeNode


                    .get("iconClass")), customIcon);
        }
    }

    protected void addClientEventHandlers(FacesContext facesContext, UIComponent component) {
        AbstractTreeNode treeNode = (AbstractTreeNode) component;

        // TODO check node state
        // TODO check toggle/selection types
        TreeRenderingContext renderingContext = TreeRenderingContext.get(facesContext);
        renderingContext.addHandlers(treeNode);
View Full Code Here


        TreeRenderingContext renderingContext = TreeRenderingContext.get(facesContext);
        renderingContext.addHandlers(treeNode);
    }

    protected UIComponent getHandleLoadingFacetIfApplicable(UIComponent component) {
        AbstractTreeNode treeNode = (AbstractTreeNode) component;

        AbstractTree tree = treeNode.findTreeComponent();

        if (getToggleTypeOrDefault(tree) != SwitchType.ajax) {
            return null;
        }

        UIComponent facet = treeNode.getFacet(HANDLE_LOADING_FACET_NAME);
        if (facet == null) {
            facet = tree.getFacet(HANDLE_LOADING_FACET_NAME);
        }

        if (facet != null && facet.isRendered()) {
View Full Code Here

            throw new FacesException(e.getMessage(), e);
        }
    }

    protected void writeTreeNodeStartElement(TreeNodeState nodeState) throws IOException {
        AbstractTreeNode treeNodeComponent = tree.findTreeNodeComponent();

        context.getAttributes().put(TREE_NODE_STATE_ATTRIBUTE, nodeState);

        responseWriter.startElement(HtmlConstants.DIV_ELEM, tree);
        responseWriter.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE,
            HtmlUtil.concatClasses("rf-tr-nd", nodeState.getNodeClass()), null);
        responseWriter.writeAttribute(HtmlConstants.ID_ATTRIBUTE, treeNodeComponent.getClientId(context), null);

        emitClientToggleEvent(treeNodeComponent, nodeState);
    }
View Full Code Here

            }

            FacesContext facesContext = ctx.getFacesContext();
            Application application = facesContext.getApplication();

            AbstractTreeNode treeNode = (AbstractTreeNode) application.createComponent(AbstractTreeNode.COMPONENT_TYPE);
            treeNode.setId(DEFAULT_TREE_NODE_ID);

            c.getFacets().put(DEFAULT_TREE_NODE_FACET_NAME, treeNode);

            UIComponent text = application.createComponent(HtmlOutputText.COMPONENT_TYPE);

            text.setValueExpression(
                "value",
                application.getExpressionFactory().createValueExpression(facesContext.getELContext(), "#{" + var + "}",
                    String.class));
            treeNode.getChildren().add(text);
        }
    }
View Full Code Here

TOP

Related Classes of org.richfaces.component.AbstractTreeNode

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.