|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
org.apache.myfaces.trinidad.model.ModelUtils
public final class ModelUtils
Provides convenience methods for converting objects into models, and working with models.
| Method Summary | |
|---|---|
static int |
findLastIndex(RowKeyIndex table, int startIndex, int endIndex)finds the last index in the given RowKeyIndex that has data and returns the next index. |
static int |
getRowCount(RowKeyIndex model)finds the last index in the given RowKeyIndex that has data and returns the next index. |
static java.util.Iterator<java.lang.Object> |
getRowKeyIterator(CollectionModel model)Gets an iteration of all the rowKeys in a collection. |
static CollectionModel |
toCollectionModel(java.lang.Object value)Converts an instance into a CollectionModel. |
static javax.faces.model.DataModel |
toDataModel(java.lang.Object value)Converts an instance into a DataModel. |
static MenuModel |
toMenuModel(java.lang.Object value)Converts an instance into a MenuModel |
static TreeModel |
toTreeModel(java.lang.Object value)Converts an instance into a TreeModel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.util.Iterator<java.lang.Object> getRowKeyIterator(CollectionModel model)
public static int getRowCount(RowKeyIndex model)
RowKeyIndex.getRowCount() of the RowKeyIndex is not known.
public static int findLastIndex(RowKeyIndex table,
int startIndex,
int endIndex)
RowKeyIndex.getRowCount() of the RowKeyIndex is not known.startIndex - starts the search from this index. Use zero to start from the beginning.endIndex - the search will stop just before this index.public static TreeModel toTreeModel(java.lang.Object value)
public static MenuModel toMenuModel(java.lang.Object value)
public static CollectionModel toCollectionModel(java.lang.Object value)
value - This can be a DataModel, List, Array or other CollectionModel.public static javax.faces.model.DataModel toDataModel(java.lang.Object value)
value - Supported instances include java.util.List and arrays.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.