Package org.apache.myfaces.custom.tree.model

Examples of org.apache.myfaces.custom.tree.model.TreePath


        if (getCreated() && Boolean.parseBoolean(expandRoot)) {
            // component was created, so expand the root node
            TreeModel model = tree.getModel(context);

            if (model != null) {
                tree.expandPath(new TreePath(new Object[] { model.getRoot() }),
                        context);
            }
        }

        tree.addToModelListeners();
View Full Code Here


        if (getCreated() && expandRoot) {
            // component was created, so expand the root node
            TreeModel model = tree.getModel(context);

            if (model != null) {
                tree.expandPath(new TreePath(new Object[] { model.getRoot() }),
                        context);
            }
        }

        tree.addToModelListeners();
View Full Code Here

    }


    public void selectionChanged(HtmlTreeNode node)
    {
        TreePath oldPath = null;

        if (selectedPath != null)
        {
            oldPath = HtmlTreeNode.translatePath(selectedPath, getModel(FacesContext.getCurrentInstance()));
        }
View Full Code Here

        Object root = model.getRoot();
        node = (HtmlTreeNode) context.getApplication().createComponent(HtmlTreeNode.COMPONENT_TYPE);
        String id = createUniqueId(context);
        node.setId(id);

        node.setPath(new TreePath(new Object[]{root}));
        node.setUserObject(root);
        node.setLayout(new int[]{HtmlTreeNode.CLOSED_SINGLE});
        getFacets().put(FACET_ROOTNODE, node);
    }
View Full Code Here

    }


    public void treeNodesChanged(TreeModelEvent e)
    {
        TreePath path = e.getTreePath();
        FacesContext context = FacesContext.getCurrentInstance();
        HtmlTreeNode node = findNode(path, context);

        if (node != null)
        {
View Full Code Here

    }


    public void treeNodesInserted(TreeModelEvent e)
    {
        TreePath path = e.getTreePath();
        FacesContext context = FacesContext.getCurrentInstance();
        HtmlTreeNode node = findNode(path, context);

        if (node != null)
        {
View Full Code Here

    }


    public void treeNodesRemoved(TreeModelEvent e)
    {
        TreePath path = e.getTreePath();
        FacesContext context = FacesContext.getCurrentInstance();
        HtmlTreeNode node = findNode(path, context);

        if (node != null)
        {
View Full Code Here

    }


    public void treeStructureChanged(TreeModelEvent e)
    {
        TreePath path = e.getTreePath();
        FacesContext context = FacesContext.getCurrentInstance();

        if (isExpanded(path, context))
        {
            collapsePath(path, context);
View Full Code Here

        {
            int index = path[i];
            translated[i + 1] = model.getChild(parent, index);
            parent = translated[i + 1];
        }
        return new TreePath(translated);
    }
View Full Code Here

        if (getCreated() && expandRoot) {
            // component was created, so expand the root node
            TreeModel model = tree.getModel(context);

            if (model != null) {
                tree.expandPath(new TreePath(new Object[] { model.getRoot() }),
                        context);
            }
        }

        tree.addToModelListeners();
View Full Code Here

TOP

Related Classes of org.apache.myfaces.custom.tree.model.TreePath

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.