Skip navigation links


org.apache.myfaces.trinidad.model
Class MenuModel

java.lang.Object
  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

 

Field Summary

 

Fields inherited from class org.apache.myfaces.trinidad.model.CollectionModel
UNKNOWN_ROW_LIMIT, UNLIMITED_ROW

 

Constructor Summary
MenuModel()
           

 

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, ensureRowsAvailable, fireRowKeyChange, getCachingStrategy, getEstimatedRowCount, getEstimatedRowCountConfidence, getRowData, getRowData, getRowKey, getRowLimit, 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

MenuModel

public MenuModel()

Method Detail

getFocusRowKey

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();
 
Returns:
the focus rowKey for the current viewId

Skip navigation links


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