Package org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu

Examples of org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuItem


            final Map<String, List<LogicalServiceAction>> serviceActionsByName,
            final CssMenuBuilder.CssMenuContext cssMenuContext) {
       
        final List<CssMenuItem> menuItems = Lists.newArrayList();
        for (String serviceName : serviceNamesInOrder) {
            final CssMenuItem serviceMenuItem = CssMenuItem.newMenuItem(serviceName).build();
            final List<LogicalServiceAction> serviceActionsForName = serviceActionsByName.get(serviceName);
            for (LogicalServiceAction logicalServiceAction : serviceActionsForName) {
                final ObjectAdapter serviceAdapter = logicalServiceAction.serviceAdapter;
                final ObjectSpecification serviceSpec = serviceAdapter.getSpecification();
                if (serviceSpec.isHidden()) {
                    continue;
                }
                final ObjectAdapterMemento serviceAdapterMemento = logicalServiceAction.serviceAdapterMemento;
                final ObjectAction objectAction = logicalServiceAction.objectAction;
                final Builder subMenuItemBuilder = serviceMenuItem.newSubMenuItem(serviceAdapterMemento, objectAction, cssMenuContext);
                if (subMenuItemBuilder == null) {
                    // not visible
                    continue;
                }
                subMenuItemBuilder.build();
            }
            if (serviceMenuItem.hasSubMenuItems()) {
                menuItems.add(serviceMenuItem);
            }
        }
        return menuItems;
    }
View Full Code Here


            final Map<String, List<LogicalServiceAction>> serviceActionsByName,
            final CssMenuBuilder.CssMenuContext cssMenuContext) {
       
        final List<CssMenuItem> menuItems = Lists.newArrayList();
        for (String serviceName : serviceNamesInOrder) {
            final CssMenuItem serviceMenuItem = CssMenuItem.newMenuItem(serviceName).build();
            final List<LogicalServiceAction> serviceActionsForName = serviceActionsByName.get(serviceName);
            for (LogicalServiceAction logicalServiceAction : serviceActionsForName) {
                final ObjectAdapter serviceAdapter = logicalServiceAction.serviceAdapter;
                final ObjectSpecification serviceSpec = serviceAdapter.getSpecification();
                if (serviceSpec.isHidden()) {
                    continue;
                }
                final ObjectAdapterMemento serviceAdapterMemento = logicalServiceAction.serviceAdapterMemento;
                final ObjectAction objectAction = logicalServiceAction.objectAction;
                final Builder subMenuItemBuilder = serviceMenuItem.newSubMenuItem(serviceAdapterMemento, objectAction, cssMenuContext);
                if (subMenuItemBuilder == null) {
                    // not visible
                    continue;
                }
                subMenuItemBuilder.build();
            }
            if (serviceMenuItem.hasSubMenuItems()) {
                menuItems.add(serviceMenuItem);
            }
        }
        return menuItems;
    }
View Full Code Here

            final Map<String, List<LogicalServiceAction>> serviceActionsByName,
            final ActionPromptProvider actionPromptModalWindowProvider) {
       
        final List<CssMenuItem> menuItems = Lists.newArrayList();
        for (String serviceName : serviceNamesInOrder) {
            final CssMenuItem serviceMenuItem = CssMenuItem.newMenuItem(serviceName).build();
            final List<LogicalServiceAction> serviceActionsForName = serviceActionsByName.get(serviceName);
            for (LogicalServiceAction logicalServiceAction : serviceActionsForName) {
                final ObjectAdapter serviceAdapter = logicalServiceAction.serviceAdapter;
                final ObjectSpecification serviceSpec = serviceAdapter.getSpecification();
                if (serviceSpec.isHidden()) {
                    continue;
                }
                final ObjectAdapterMemento serviceAdapterMemento = logicalServiceAction.serviceAdapterMemento;
                final ObjectAction objectAction = logicalServiceAction.objectAction;
                final Builder subMenuItemBuilder = serviceMenuItem.newSubMenuItem(serviceAdapterMemento, objectAction, cssMenuLinkFactory, actionPromptModalWindowProvider);
                if (subMenuItemBuilder == null) {
                    // not visible
                    continue;
                }
                subMenuItemBuilder.build();
            }
            if (serviceMenuItem.hasSubMenuItems()) {
                menuItems.add(serviceMenuItem);
            }
        }
        return menuItems;
    }
View Full Code Here

        if (serviceSpec.isHidden()) {
            return;
        }
        final ObjectAdapterMemento serviceAdapterMemento = ObjectAdapterMemento.createOrNull(serviceAdapter);
        final String serviceName = serviceSpec.getFacet(NamedFacet.class).value();
        final CssMenuItem serviceMenuItem = CssMenuItem.newMenuItem(serviceName).build();

        addActionSubMenuItems(serviceAdapterMemento, serviceMenuItem);
        if (serviceMenuItem.hasSubMenuItems()) {
            menuItems.add(serviceMenuItem);
        }
    }
View Full Code Here

        if (serviceSpec.isHidden()) {
            return;
        }
        final ObjectAdapterMemento serviceAdapterMemento = ObjectAdapterMemento.createOrNull(serviceAdapter);
        final String serviceName = serviceSpec.getFacet(NamedFacet.class).value();
        final CssMenuItem serviceMenuItem = CssMenuItem.newMenuItem(serviceName).build();

        addActionSubMenuItems(serviceAdapterMemento, serviceMenuItem);
        if (serviceMenuItem.hasSubMenuItems()) {
            menuItems.add(serviceMenuItem);
        }
    }
View Full Code Here

     * Builds a hierarchy of {@link CssMenuItem}s, following the provided map of {@link LogicalServiceAction}s (keyed by their service Name).
     */
    private List<CssMenuItem> buildMenuItems(final List<String> serviceNamesInOrder, final Map<String, List<LogicalServiceAction>> serviceActionsByName) {
        final List<CssMenuItem> menuItems = Lists.newArrayList();
        for (String serviceName : serviceNamesInOrder) {
            final CssMenuItem serviceMenuItem = CssMenuItem.newMenuItem(serviceName).build();
            final List<LogicalServiceAction> serviceActionsForName = serviceActionsByName.get(serviceName);
            for (LogicalServiceAction logicalServiceAction : serviceActionsForName) {
                final ObjectAdapter serviceAdapter = logicalServiceAction.serviceAdapter;
                final ObjectSpecification serviceSpec = serviceAdapter.getSpecification();
                if (serviceSpec.isHidden()) {
                    continue;
                }
                final ObjectAdapterMemento serviceAdapterMemento = logicalServiceAction.serviceAdapterMemento;
                final ObjectAction objectAction = logicalServiceAction.objectAction;
                final Builder subMenuItemBuilder = serviceMenuItem.newSubMenuItem(serviceAdapterMemento, objectAction, cssMenuLinkFactory);
                if (subMenuItemBuilder == null) {
                    // not visible
                    continue;
                }
                subMenuItemBuilder.build();
            }
            if (serviceMenuItem.hasSubMenuItems()) {
                menuItems.add(serviceMenuItem);
            }
        }
        return menuItems;
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuItem

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.