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

    Fields
    Modifier and Type
    Field
    Description
    protected org.imixs.workflow.ItemCollection
     
    static final String
     
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method navigates back in the page index and caches the current page index
    static void
    downloadExcelFile(org.imixs.workflow.FileData fileData)
    Helper method to initialize a file download
    Exports data into a excel template processed by apache-poi.
    void
    This method navigates forward in the page index and caches the current page index
    org.imixs.workflow.ItemCollection
     
     
    org.imixs.workflow.ItemCollection
     
    Returns the current query
     
    List<org.imixs.workflow.ItemCollection>
     
    void
     
    List<org.imixs.workflow.ItemCollection>
     
    void
    This method loads the custom form sections
    void
    run()
    This helper method builds a query from the query definition and the current filter criteria.
    void
    setErrorMessage(String errorMessage)
     
    void
    setFilter(org.imixs.workflow.ItemCollection filter)
     
    protected void
    Starts a new conversation

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ERROR_CONFIG

      public static final String 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:
      init in class org.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:
      loadData in class org.imixs.workflow.faces.data.ViewController
      Throws:
      org.imixs.workflow.exceptions.QueryException
    • getDataViewDefinition

      public org.imixs.workflow.ItemCollection getDataViewDefinition()
    • getSections

      public List<CustomFormSection> getSections()
    • getViewItemDefinitions

      public List<org.imixs.workflow.ItemCollection> getViewItemDefinitions()
    • 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:
    • downloadExcelFile

      public static void downloadExcelFile(org.imixs.workflow.FileData fileData) throws IOException
      Helper method to initialize a file download
      Throws:
      IOException