Class MenuModel

  extended by javax.faces.model.DataModel
      extended by org.apache.myfaces.trinidad.model.CollectionModel
          extended by org.apache.myfaces.trinidad.model.TreeModel
              extended by org.apache.myfaces.trinidad.model.MenuModel
All Implemented Interfaces:
Iterable, LocalRowKeyIndex, RowKeyIndex, TreeLocalRowKeyIndex
Direct Known Subclasses:
BaseMenuModel, ChildPropertyMenuModel

public abstract class MenuModel
extends TreeModel

A MenuModel objects represents the menu structure of a page or application. The menu model should know how to go from the current viewId to a focus rowKey.

MenuModel extends TreeModel and adds a single method, getFocusRowKey(), which returns the rowKey of the focus page for the current view id.

Work on modeling menus continues and it is very possible that this class will change in a future release.

Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.myfaces.trinidad.model.LocalRowKeyIndex
LocalRowKeyIndex.Confidence, LocalRowKeyIndex.LocalCachingStrategy
Constructor Summary
Method Summary
abstract  Object getFocusRowKey()
          Gets the focus rowKey for the current viewId.
Methods inherited from class org.apache.myfaces.trinidad.model.TreeModel
areRowsLocallyAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, enterContainer, exitContainer, getAllAncestorContainerRowKeys, getContainerRowKey, getContainerRowKey, getDepth, getDepth, isChildCollectionLocallyAvailable, isChildCollectionLocallyAvailable, isChildCollectionLocallyAvailable, isContainer, isContainerEmpty
Methods inherited from class org.apache.myfaces.trinidad.model.CollectionModel
addRowKeyChangeListener, areRowsAvailable, areRowsAvailable, areRowsAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, clearCachedRow, clearCachedRow, clearCachedRows, clearCachedRows, clearLocalCache, fireRowKeyChange, getCachingStrategy, getEstimatedRowCount, getEstimatedRowCountConfidence, getRowData, getRowData, getRowKey, getSortCriteria, isRowAvailable, isRowAvailable, isRowLocallyAvailable, isRowLocallyAvailable, isSortable, removeRowKeyChangeListener, setRowKey, setSortCriteria
Methods inherited from class javax.faces.model.DataModel
addDataModelListener, getDataModelListeners, getRowCount, getRowData, getRowIndex, getWrappedData, isRowAvailable, iterator, removeDataModelListener, setRowIndex, setWrappedData
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.myfaces.trinidad.model.RowKeyIndex
getRowCount, getRowData, getRowIndex, isRowAvailable, setRowIndex

Constructor Detail


public MenuModel()
Method Detail


public abstract Object getFocusRowKey()
Gets the focus rowKey for the current viewId. If there is no item in focus, getFocusRowKey should return null.

The value returned from calling CollectionModel.getRowKey() should remain the same before and after calling getFocusRowKey(). Meaning initialPath and currPath should always be equal in the following example

   Object initialPath = model.getRowKey();
   Object focusPath   = model.getFocusRowKey();
   Object currPath    = model.getRowKey();

the focus rowKey for the current viewId

Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.