Class SuggestInputController

  • All Implemented Interfaces:
    Serializable

    @Named
    @SessionScoped
    public class SuggestInputController
    extends Object
    implements Serializable
    The SuggestInputController can be used to suggest inputs from earlier requests within the same workflowGroup.
    Version:
    1.0
    Author:
    rsoika
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MAX_RESULT  
      protected org.imixs.workflow.faces.data.WorkflowController workflowController  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getDisplayLine​(String displayItemList, org.imixs.workflow.ItemCollection suggestItemCol)
      Helper method that creates an entry line output for the suggest resultlist.
      List<org.imixs.workflow.ItemCollection> getSearchResult()  
      void onWorkflowEvent​(org.imixs.workflow.faces.data.WorkflowEvent workflowEvent)
      If the current workitem changed reset the last search result
      void reset()
      This method reset the search and input state.
      void reset​(javax.faces.event.AjaxBehaviorEvent event)
      This ajax event method reset the search and input state.
      void search​(String keyItemName, String input, String searchItemList, String query)
      This method initializes a lucene search.
      void update​(org.imixs.workflow.ItemCollection workitem, org.imixs.workflow.ItemCollection suggest, String itemList)
      This method updates the current workitem with the values defined by teh itemList from the given suggest workitem.
    • Field Detail

      • workflowController

        @Inject
        protected org.imixs.workflow.faces.data.WorkflowController workflowController
    • Constructor Detail

      • SuggestInputController

        public SuggestInputController()
    • Method Detail

      • getSearchResult

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

        public void reset()
        This method reset the search and input state.
      • reset

        public void reset​(javax.faces.event.AjaxBehaviorEvent event)
        This ajax event method reset the search and input state.
        Parameters:
        event -
      • update

        public void update​(org.imixs.workflow.ItemCollection workitem,
                           org.imixs.workflow.ItemCollection suggest,
                           String itemList)
        This method updates the current workitem with the values defined by teh itemList from the given suggest workitem.
        Parameters:
        suggest - - ItemColleciton with data to suggest
        itemList - - item names to be updated.
      • search

        public void search​(String keyItemName,
                           String input,
                           String searchItemList,
                           String query)
        This method initializes a lucene search. The method is triggered by ajax events from the userInput.xhtml page. The minimum length of a given input search phrase have to be at least 3 characters
        Parameters:
        keyItemName - - itemName to identify the unique itemCollection
        input - - search phrase
        searchItemList - - itemName list to serach for
      • onWorkflowEvent

        public void onWorkflowEvent​(@Observes
                                    org.imixs.workflow.faces.data.WorkflowEvent workflowEvent)
        If the current workitem changed reset the last search result
        Parameters:
        workflowEvent -
      • getDisplayLine

        public String getDisplayLine​(String displayItemList,
                                     org.imixs.workflow.ItemCollection suggestItemCol)
        Helper method that creates an entry line output for the suggest resultlist.
        Parameters:
        displayItemList -
        suggestItemCol -
        Returns: