Examples of MenuModel


Examples of org.apache.myfaces.trinidad.model.MenuModel

  }

  @Override
  public CollectionModel createCollectionModel(CollectionModel current, Object value)
  {
    MenuModel model = ModelUtils.toMenuModel(value);
    model.setRowKey(null);
    return model;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.MenuModel

   * @return the focus rowKey for the current viewId
   */
  @Override
  public Object getFocusRowKey()
  {
    MenuModel model = getMenuModel();
    if (model != null)
    {
      Object currPath  = model.getRowKey();     
      Object focusPath = model.getFocusRowKey();

      // The row key should not change as a result of calling getFocusRowKey()
      assert(((currPath == null) && (model.getRowKey() == null)) ||
             ((currPath != null) && currPath.equals(model.getRowKey())));
      return focusPath;
    }

    return null;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.MenuModel

  }

  @Override
  public CollectionModel createCollectionModel(CollectionModel current, Object value)
  {
    MenuModel model = ModelUtils.toMenuModel(value);
    model.setRowKey(null);
    return model;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.MenuModel

   * @return the focus rowKey for the current viewId
   */
  @Override
  public Object getFocusRowKey()
  {
    MenuModel model = getMenuModel();
    if (model != null)
    {
      Object currPath = null;
      assert((currPath = model.getRowKey()) != null);
      Object focusPath = model.getFocusRowKey();
      // the path better have been reset after you call getFocusPath
      assert(currPath.equals(model.getRowKey()));
      return focusPath;
    }

    return null;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.MenuModel

  }

  @Override
  public CollectionModel createCollectionModel(CollectionModel current, Object value)
  {
    MenuModel model = ModelUtils.toMenuModel(value);
    model.setRowKey(null);
    return model;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.MenuModel

   * @return the focus rowKey for the current viewId
   */
  @Override
  public Object getFocusRowKey()
  {
    MenuModel model = getMenuModel();
    if (model != null)
    {
      Object currPath  = model.getRowKey();     
      Object focusPath = model.getFocusRowKey();

      // The row key should not change as a result of calling getFocusRowKey()
      assert(((currPath == null) && (model.getRowKey() == null)) ||
             ((currPath != null) && currPath.equals(model.getRowKey())));
      return focusPath;
    }

    return null;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.MenuModel

  }

  @Override
  public CollectionModel createCollectionModel(CollectionModel current, Object value)
  {
    MenuModel model = ModelUtils.toMenuModel(value);
    model.setRowKey(null);
    return model;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.MenuModel

   * @return the focus rowKey for the current viewId
   */
  @Override
  public Object getFocusRowKey()
  {
    MenuModel model = getMenuModel();
    if (model != null)
    {
      Object currPath  = model.getRowKey();     
      Object focusPath = model.getFocusRowKey();

      // The row key should not change as a result of calling getFocusRowKey()
      assert(((currPath == null) && (model.getRowKey() == null)) ||
             ((currPath != null) && currPath.equals(model.getRowKey())));
      return focusPath;
    }

    return null;
  }
View Full Code Here

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

Examples of org.primefaces.model.MenuModel

    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
TOP
Copyright © 2018 www.massapi.com. 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.