Package org.brixcms.plugin.menu

Examples of org.brixcms.plugin.menu.Menu


            };
            IModel<String> labelModel = new AbstractModel<String>() {
                @Override
                public String getObject() {
                    BrixNode node = item.getModelObject();
                    Menu menu = new Menu();
                    menu.loadName(node);
                    return menu.getName();
                }
            };
            select.add(new Label("label", labelModel));
            item.add(select);
        }
View Full Code Here


        this.startAtLevel = startAtLevel;
    }

    public Menu getMenu() {
        if (cachedMenu == null && getMenuNode() != null) {
            cachedMenu = new Menu();
            cachedMenu.load(getMenuNode());
        }
        return cachedMenu;
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
        NodeAdapter adapter = new NodeAdapter(getModelObject());
        Menu menu = new Menu();
        menu.load(adapter.getMenuNode());

        final Response response = getResponse();
        response.write("<ul");
        if (!Strings.isEmpty(adapter.getOuterUlCssClass())) {
            response.write(" class=\"");
            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));
        }
View Full Code Here

TOP

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

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.