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 Details

    • viewItemDefinitions

      protected List<org.imixs.workflow.ItemCollection> viewItemDefinitions
    • dataViewDefinition

      protected org.imixs.workflow.ItemCollection dataViewDefinition
    • filter

      protected org.imixs.workflow.ItemCollection filter
    • query

      protected String query
    • errorMessage

      protected String errorMessage
    • dataViewCache

      @Inject protected DataViewCache 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

      @Inject protected DataViewService dataViewService
    • viewHandler

      @Inject protected org.imixs.workflow.faces.data.ViewHandler viewHandler
    • dataViewDefinitionController

      @Inject protected DataViewDefinitionController dataViewDefinitionController
  • Constructor Details

    • DataViewController

      public DataViewController()
  • Method Details

    • init

      @PostConstruct public void init()
      Overrides:
      init in class org.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

      public List<org.imixs.workflow.ItemCollection> getViewItemDefinitions()
    • getViewItemDefinitions

      public List<org.imixs.workflow.ItemCollection> getViewItemDefinitions(String dataView)
      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

      public String getErrorMessage()
    • setErrorMessage

      public void setErrorMessage(String errorMessage)
    • run

      public void run() throws org.imixs.workflow.exceptions.PluginException, org.imixs.workflow.exceptions.QueryException
      This 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.QueryException
      org.imixs.workflow.exceptions.PluginException
    • getQuery

      public String getQuery()
      Returns the current query
      Overrides:
      getQuery in class org.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.QueryException
      Exports 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.PluginException
      org.imixs.workflow.exceptions.QueryException
      See Also: