Class DataViewController
java.lang.Object
org.imixs.workflow.faces.data.ViewController
org.imixs.workflow.office.dataview.DataViewController
- All Implemented Interfaces:
Serializable
@Named
@ConversationScoped
public class DataViewController
extends org.imixs.workflow.faces.data.ViewController
The DataViewController is used to display a data view
The controller uses the uniqueId from the URL to load the definition. The bean reads optional cached query data form a session scoped cache EJB and reloads the last state. This is useful for situations where the user navigates to a new page (e.g. open a workitem) and late uses browser history back.
Note: This bean is ConversationScoped, because it uses the CustomFormController which expects conversion scope!
- Version:
- 1.0
- Author:
- rsoika
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.imixs.workflow.ItemCollectionstatic final Stringstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidback()This method navigates back in the page index and caches the current page indexstatic voiddownloadExcelFile(org.imixs.workflow.FileData fileData) Helper method to initialize a file downloadexport()Exports data into a excel template processed by apache-poi.voidforward()This method navigates forward in the page index and caches the current page indexorg.imixs.workflow.ItemCollectionorg.imixs.workflow.ItemCollectiongetQuery()Returns the current queryList<org.imixs.workflow.ItemCollection>voidinit()List<org.imixs.workflow.ItemCollection>loadData()voidonLoad()This method loads the custom form sectionsvoidrun()This helper method builds a query from the query definition and the current filter criteria.voidsetErrorMessage(String errorMessage) voidsetFilter(org.imixs.workflow.ItemCollection filter) protected voidStarts a new conversationMethods inherited from class org.imixs.workflow.faces.data.ViewController
getPageIndex, getPageSize, getSortBy, getTotalCount, getTotalPages, getWorkitems, isEndOfList, isLoadStubs, isSortReverse, reset, setEndOfList, setLoadStubs, setPageIndex, setPageSize, setQuery, setSortBy, setSortReverse
-
Field Details
-
ERROR_CONFIG
- See Also:
-
MAX_ROWS
public static final int MAX_ROWS- See Also:
-
dataViewDefinition
protected org.imixs.workflow.ItemCollection dataViewDefinition
-
-
Constructor Details
-
DataViewController
public DataViewController()
-
-
Method Details
-
init
@PostConstruct public void init()- Overrides:
initin classorg.imixs.workflow.faces.data.ViewController
-
onLoad
public void onLoad()This method loads the custom form sections -
loadData
public List<org.imixs.workflow.ItemCollection> loadData() throws org.imixs.workflow.exceptions.QueryException- Overrides:
loadDatain classorg.imixs.workflow.faces.data.ViewController- Throws:
org.imixs.workflow.exceptions.QueryException
-
getDataViewDefinition
public org.imixs.workflow.ItemCollection getDataViewDefinition() -
getSections
-
getViewItemDefinitions
-
getFilter
public org.imixs.workflow.ItemCollection getFilter() -
setFilter
public void setFilter(org.imixs.workflow.ItemCollection filter) -
getErrorMessage
-
setErrorMessage
-
run
public void run() throws org.imixs.workflow.exceptions.PluginException, org.imixs.workflow.exceptions.QueryExceptionThis helper method builds a query from the query definition and the current filter criteria. The method loads the query form the definition and replaces all {} elements with the values from the filter - Throws:
org.imixs.workflow.exceptions.QueryExceptionorg.imixs.workflow.exceptions.PluginException
-
getQuery
Returns the current query- Overrides:
getQueryin classorg.imixs.workflow.faces.data.ViewController- Returns:
-
back
public void back()This method navigates back in the page index and caches the current page index -
forward
public void forward()This method navigates forward in the page index and caches the current page index -
startConversation
protected void startConversation()Starts a new conversation -
export
public String export() throws org.imixs.workflow.exceptions.PluginException, org.imixs.workflow.exceptions.QueryExceptionExports data into a excel template processed by apache-poi. The method sends a DataViewExport event to allow clients to adapt the export process.- Throws:
org.imixs.workflow.exceptions.PluginExceptionorg.imixs.workflow.exceptions.QueryException- See Also:
-
downloadExcelFile
Helper method to initialize a file download- Throws:
IOException
-