Package com.sparc.knappsack.models

Examples of com.sparc.knappsack.models.MenuItem


                // Get categories for side menu
                List<Category> categories = userService.getCategoriesForUser(user, deviceType, SortOrder.ASCENDING);
                List<MenuItem> categoryMenuItems = new ArrayList<MenuItem>();
                if (categories != null) {
                    for (Category category : categories) {
                        MenuItem menuItem = new MenuItem(category.getName(), category.getId());
                        categoryMenuItems.add(menuItem);
                    }
                }
                modelAndView.getModel().put("categoryMenuItems", categoryMenuItems);

                // Get groups for side menu
                List<MenuItem> groupMenuItems = new ArrayList<MenuItem>();
                List<Group> groups = userService.getGroupsForActiveOrganization(user, SortOrder.ASCENDING);
                if (groups != null) {
                    for (Group group : groups) {
                        MenuItem groupModel = new MenuItem(group.getName(), group.getId());
                        groupMenuItems.add(groupModel);
                    }
                }
                modelAndView.getModel().put("groupMenuItems", groupMenuItems);
View Full Code Here

TOP

Related Classes of com.sparc.knappsack.models.MenuItem

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.