Package org.apache.wicket.markup.html.tree

Examples of org.apache.wicket.markup.html.tree.LinkTree


                    excuteAction(getDocument(), REMOVE_ACTION);
                    DefaultMutableTreeNode node = getSelectedNode();
                    DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode) node
                            .getParent();
                    parentNode.remove(node);
                    LinkTree tree = (PortalTree) getPage().get("siteTree");
                    tree.updateTree(target);
                }
            }.add(new JavascriptEventConfirmation("onclick", new ResourceModel("action.delete.confirm"))));
            infoForm.add(new AjaxButton("save",new ResourceModel("common.save"), infoForm)
            {
View Full Code Here


                    folder.setTitle(document.getTitle());
                    folder.setShortTitle(document.getShortTitle());
                    folderAction(folder, SAVE_ACTION);
                    node.insert(new DefaultMutableTreeNode(new SiteTreeNode(
                            folder)), 0);
                    LinkTree tree = (PortalTree) getPage().get("siteTree");
                    tree.getTreeState().expandNode(node);
                    tree.updateTree(target);
                    ((ModalWindow) AddFolderPanel.this.getParent())
                            .close(target);
                }

                @Override
View Full Code Here

            // Adding menu tree node
            menuTreeRoot = new DefaultTreeModel(rootNode);
            // controlMenuTabs(false);
            final AjaxTabbedPanel menusTab = new AjaxTabbedPanel("menuTabs",
                    menuTabs);
            menuTree = new LinkTree("menuTree", new PropertyModel(this,
                    "menuTreeRoot"))
            {

                @Override
                protected void onNodeLinkClicked(Object node, BaseTree tree,
View Full Code Here

            // Adding menu tree node
            DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(
                    new SiteTreeNode("Root", "/", FileType.Folder, false));
            retrieveCopyFolders("/", rootNode);
            copyTreeNode = new DefaultTreeModel(rootNode);
            final LinkTree copyTree = new LinkTree("copyTree",
                    new PropertyModel(this, "copyTreeNode"))
            {

                @Override
                protected void onNodeLinkClicked(Object node, BaseTree tree,
                        AjaxRequestTarget target)
                {
                    DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) node;
                    SiteTreeNode siteNode = (SiteTreeNode) treeNode
                            .getUserObject();
                    if (!tree.getTreeState().isNodeExpanded(treeNode))
                    {
                        if (siteNode.getDocType() == SiteTreeNode.FileType.Folder
                                && !siteNode.isLoaded())
                        {
                            retrieveCopyFolders(siteNode.getNodePath(),
                                    treeNode);
                            siteNode.setLoaded(false);
                            this.updateTree();
                        }
                        this.getTreeState().expandNode(treeNode);
                    } else
                    {
                        tree.getTreeState().collapseNode(treeNode);
                    }
                    setDocPath(siteNode.getNodePath());
                }
            };
            copyTree.getTreeState().expandNode(copyTreeNode);
            add(copyTree);
            add(copyForm);
        }
View Full Code Here

                    link.setTarget(document.getTarget());
                    link.setHidden(document.isHidden());
                    linkAction(link, SAVE_ACTION);
                    node.insert(new DefaultMutableTreeNode(new SiteTreeNode(
                            link)), 0);
                    LinkTree tree = (PortalTree) getPage().get("siteTree");
                    tree.getTreeState().expandNode(node);
                    tree.updateTree(target);
                    ((ModalWindow) AddLinkPanel.this.getParent()).close(target);
                }

                @Override
                protected void onError(AjaxRequestTarget target, Form<?> form)
View Full Code Here

                    page.setSkin(document.getDesktopTheme());
                    page.setHidden(document.isHidden());
                    PageAction(page, SAVE_ACTION);
                    node.insert(new DefaultMutableTreeNode(new SiteTreeNode(
                            page)), 0);
                    LinkTree tree = (PortalTree) getPage().get("siteTree");
                    tree.getTreeState().expandNode(node);
                    tree.updateTree(target);
                    ((ModalWindow) AddPagePanel.this.getParent()).close(target);
                }

                @Override
                protected void onError(AjaxRequestTarget target, Form<?> form)
View Full Code Here

        treeContainer.add(tree);
    }

    private void updateTree() {

        tree = new LinkTree("treeTable", roleTreeBuilder.build()) {

            private static final long serialVersionUID = -5514696922119256101L;

            @Override
            protected IModel getNodeTextModel(final IModel model) {
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.tree.LinkTree

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.