Package org.brixcms.plugin.menu.Menu

Examples of org.brixcms.plugin.menu.Menu.ChildEntry


        links.add(new AjaxLink("addTopLevel") {
            @Override
            public void onClick(AjaxRequestTarget target) {
                MenuTreeNode parent = (MenuTreeNode) treeModel.getRoot();
                ChildEntry entry = new ChildEntry(parent.getEntry());
                entry.setTitle(getString("newEntry"));
                parent.getEntry().getChildren().add(entry);
                MenuTreeNode node = new MenuTreeNode(entry);
                treeModel.nodeInserted(tree, parent, node);
                tree.getTreeState().selectNode(node, true);
                tree.updateTree();
            }
        });

        links.add(new AjaxLink("add") {
            @Override
            public void onClick(AjaxRequestTarget target) {
                ChildEntry entry = new ChildEntry(getSelected().getEntry());
                entry.setTitle(getString("newEntry"));
                getSelected().getEntry().getChildren().add(entry);
                MenuTreeNode node = new MenuTreeNode(entry);
                treeModel.nodeInserted(tree, getSelected(), node);
                tree.getTreeState().selectNode(node, true);
                tree.updateTree();
View Full Code Here


            response.write(adapter.getOuterUlCssClass());
            response.write("\"");
        }
        response.write(">");
        List<ChildEntry> childEntryList = menu.getRoot().getChildren();
        ChildEntry firstEntry = childEntryList.get(0);
        ChildEntry lastEntry = childEntryList.get(childEntryList.size() - 1);
        for (ChildEntry entry : childEntryList) {
            renderEntry(entry, adapter, response, getSelectedItems(menu), firstEntry.equals(entry), lastEntry.equals(entry));
        }
        response.write("</ul>");
    }
View Full Code Here

                response.write(adapter.getInnerUlCssClass());
                response.write("\"");
            }
            response.write(">");
            List<ChildEntry> childEntryList = entry.getChildren();
            ChildEntry firstEntry = childEntryList.get(0);
            ChildEntry lastEntry = childEntryList.get(childEntryList.size() - 1);
            for (ChildEntry e : childEntryList) {
                BrixNode node = getNode(e);
                if (node == null || SitePlugin.get().canViewNode(node, Context.PRESENTATION)) {
                    renderEntry(e, adapter, response, selectedItems, firstEntry.equals(e), lastEntry.equals(e));
                }
            }
            response.write("</ul>");
        }
        response.write("</li>");
View Full Code Here

TOP

Related Classes of org.brixcms.plugin.menu.Menu.ChildEntry

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.