Package org.imixs.workflow.faces.data
Class ViewController
- java.lang.Object
-
- org.imixs.workflow.faces.data.ViewController
-
- All Implemented Interfaces:
Serializable
@Named @ViewScoped public class ViewController extends Object implements Serializable
The ViewController can be used in JSF Applications to manage lists of ItemCollections.The view property defines the view type returned by a method call of loadData. The ViewController implements a lazy loading mechanism to cache the result.
The property 'loadStubs' can be used to define if only the Document Stubs (default) or the full Document should be loaded.
The ViewController bean should be used in ViewScope.
- Version:
- 0.0.1
- Author:
- rsoika
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ViewController()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
getPageIndex()
Navigationint
getPageSize()
returns the maximum size of a search resultString
getQuery()
Returns the search QueryString
getSortBy()
List<ItemCollection>
getWorkitems()
Deprecated.void
init()
boolean
isEndOfList()
boolean
isLoadStubs()
boolean
isSortReverse()
List<ItemCollection>
loadData()
Returns the current view result.void
reset()
resets the current result and set the page pointer to 0.void
setEndOfList(boolean endOfList)
void
setLoadStubs(boolean loadStubs)
void
setPageIndex(int pageIndex)
void
setPageSize(int pageSize)
set the maximum size of a search resultvoid
setQuery(String query)
set the search queryvoid
setSortBy(String sortBy)
void
setSortReverse(boolean sortReverse)
-
-
-
Method Detail
-
init
@PostConstruct public void init()
-
getQuery
public String getQuery()
Returns the search Query- Returns:
-
setQuery
public void setQuery(String query)
set the search query- Parameters:
query
-
-
getSortBy
public String getSortBy()
-
setSortBy
public void setSortBy(String sortBy)
-
isSortReverse
public boolean isSortReverse()
-
setSortReverse
public void setSortReverse(boolean sortReverse)
-
getPageSize
public int getPageSize()
returns the maximum size of a search result- Returns:
-
setPageSize
public void setPageSize(int pageSize)
set the maximum size of a search result- Parameters:
searchCount
-
-
isLoadStubs
public boolean isLoadStubs()
-
setLoadStubs
public void setLoadStubs(boolean loadStubs)
-
reset
public void reset()
resets the current result and set the page pointer to 0.
-
getWorkitems
@Deprecated public List<ItemCollection> getWorkitems() throws QueryException
Deprecated.- Throws:
QueryException
-
getPageIndex
public int getPageIndex()
Navigation
-
setPageIndex
public void setPageIndex(int pageIndex)
-
isEndOfList
public boolean isEndOfList()
-
setEndOfList
public void setEndOfList(boolean endOfList)
-
loadData
public List<ItemCollection> loadData() throws QueryException
Returns the current view result. The returned result set is defined by the current query definition.The method implements a lazy loading mechanism and caches the result locally.
- Returns:
- view result
- Throws:
QueryException
-
-