Package org.imixs.workflow.dataview
Class DataViewController
java.lang.Object
org.imixs.workflow.faces.data.ViewController
org.imixs.workflow.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.
- Version:
- 1.0
- Author:
- rsoika
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jakarta.enterprise.context.Conversationprotected DataViewCacheprotected org.imixs.workflow.ItemCollectionprotected DataViewDefinitionControllerprotected DataViewServiceprotected org.imixs.workflow.engine.DocumentServiceprotected Stringprotected org.imixs.workflow.ItemCollectionprotected Stringprotected org.imixs.workflow.faces.data.ViewHandlerprotected List<org.imixs.workflow.ItemCollection>protected org.imixs.workflow.faces.data.WorkflowControllerprotected org.imixs.workflow.engine.WorkflowService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidback()This method navigates back in the page index and caches the current page indexexport()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>List<org.imixs.workflow.ItemCollection>getViewItemDefinitions(String dataView) Loads a dataView Item Definition by namevoidinit()voidonLoad()This method loads the form information and prefetches the datavoidrun()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, getWorkitems, isEndOfList, isLoadStubs, isSortReverse, loadData, reset, setEndOfList, setLoadStubs, setPageIndex, setPageSize, setQuery, setSortBy, setSortReverse
-
Field Details
-
viewItemDefinitions
-
dataViewDefinition
protected org.imixs.workflow.ItemCollection dataViewDefinition -
filter
protected org.imixs.workflow.ItemCollection filter -
query
-
errorMessage
-
dataViewCache
-
conversation
@Inject protected jakarta.enterprise.context.Conversation conversation -
documentService
@Inject protected org.imixs.workflow.engine.DocumentService documentService -
workflowService
@Inject protected org.imixs.workflow.engine.WorkflowService workflowService -
workflowController
@Inject protected org.imixs.workflow.faces.data.WorkflowController workflowController -
dataViewService
-
viewHandler
@Inject protected org.imixs.workflow.faces.data.ViewHandler viewHandler -
dataViewDefinitionController
-
-
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 form information and prefetches the data -
getDataViewDefinition
public org.imixs.workflow.ItemCollection getDataViewDefinition() -
getViewItemDefinitions
-
getViewItemDefinitions
Loads a dataView Item Definition by name- Parameters:
dataView- - name of the dataview- Returns:
-
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:
-