Package org.primefaces.model

Examples of org.primefaces.model.MenuModel


public abstract class AbstractMenu extends UIComponentBase {
 
  private final static String BUILT_FROM_MODEL_PARAM = "_builtFromModel";
 
  public void buildMenuFromModel() {
    MenuModel model = (MenuModel) getModel();
   
    if(model != null) {
      for(UIComponent kid : model.getSubmenus())
        getChildren().add(kid);
     
      for(UIComponent kid : model.getMenuItems())
        getChildren().add(kid);
     
      markAsBuiltFromModel();
    }
  }
View Full Code Here


    public UserRoles getRole() {
        return role;
    }

    public MenuModel getMenuModel() {
        MenuModel menuModel = new DefaultMenuModel();

        for (MenuItem menuItem : this.urlsMenuMap) {
            menuModel.addMenuItem(menuItem);
        }
        return menuModel;
    }
View Full Code Here

import org.primefaces.model.MenuModel;

public abstract class AbstractMenu extends UIComponentBase {
   
  public void buildMenuFromModel() {
    MenuModel model = (MenuModel) getModel();
   
        getChildren().clear();
       
    if(model != null) {
      for(UIComponent kid : model.getSubmenus()) {
        getChildren().add(kid);
            }
     
      for(UIComponent kid : model.getMenuItems()) {
        getChildren().add(kid);
            }
    }
  }
View Full Code Here

TOP

Related Classes of org.primefaces.model.MenuModel

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.