Package org.imixs.workflow.office.forms
Class WorkitemLinkController
- java.lang.Object
-
- org.imixs.workflow.office.forms.WorkitemLinkController
-
- All Implemented Interfaces:
Serializable
@Named @RequestScoped public class WorkitemLinkController extends Object implements Serializable
The WorkitemLinkController provides suggest-box behavior based on the JSF 2.0 ajax capability to add WorkItem references to the current WorkItem. All WorkItem references will be stored in the property 'txtworkitemref' Note: @RequestScoped did not work because the ajax request will reset the result during submit- Version:
- 1.0
- Author:
- rsoika
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringLINK_PROPERTYstatic StringLINK_PROPERTY_DEPRECATEDstatic Loggerloggerstatic intMAX_SEARCH_RESULTprotected org.imixs.workflow.engine.index.SchemaServiceschemaServiceprotected org.imixs.workflow.faces.data.WorkflowControllerworkflowControllerprotected org.imixs.workflow.engine.WorkflowServiceworkflowService
-
Constructor Summary
Constructors Constructor Description WorkitemLinkController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.imixs.workflow.ItemCollection>getExternalReferences()Returns a list of all workItems holding a reference to the current workItem.List<org.imixs.workflow.ItemCollection>getExternalReferences(String filter)returns a list of all workItems holding a reference to the current workItem.List<org.imixs.workflow.ItemCollection>getReferences()This method returns a list of all ItemCollections referred by the current workItem (txtWorkitemRef).List<org.imixs.workflow.ItemCollection>getReferences(String filter)This method returns a list of ItemCollections referred by the current workItem ($WorkitemRef).List<org.imixs.workflow.ItemCollection>getSearchResult()org.imixs.workflow.ItemCollectiongetWorkitem(String id)Helper method to load a full workitem from the frontendvoidsearchWorkitems()This method searches a text phrase within the user profile objects (type=profile).List<org.imixs.workflow.ItemCollection>searchWorkitems(String phrase, String filter)This method returns a list of profile ItemCollections matching the search phrase.
-
-
-
Field Detail
-
LINK_PROPERTY
public static final String LINK_PROPERTY
- See Also:
- Constant Field Values
-
LINK_PROPERTY_DEPRECATED
public static final String LINK_PROPERTY_DEPRECATED
- See Also:
- Constant Field Values
-
MAX_SEARCH_RESULT
public static final int MAX_SEARCH_RESULT
- See Also:
- Constant Field Values
-
logger
public static Logger logger
-
workflowService
protected org.imixs.workflow.engine.WorkflowService workflowService
-
schemaService
protected org.imixs.workflow.engine.index.SchemaService schemaService
-
workflowController
@Inject protected org.imixs.workflow.faces.data.WorkflowController workflowController
-
-
Method Detail
-
searchWorkitems
public void searchWorkitems()
This method searches a text phrase within the user profile objects (type=profile).JSF Integration:
<h:commandScript name="imixsOfficeWorkflow.mlSearch" action= "#{cargosoftController.search()}" rendered="#{cargosoftController!=null}" render= "cargosoft-results" />JavaScript Example:
imixsOfficeWorkflow.cargosoftSearch({ item: '_invoicenumber' })
-
searchWorkitems
public List<org.imixs.workflow.ItemCollection> searchWorkitems(String phrase, String filter)
This method returns a list of profile ItemCollections matching the search phrase. The search statement includes the items 'txtName', 'txtEmail' and 'txtUserName'. The result list is sorted by txtUserName- Parameters:
phrase- - search phrase- Returns:
- - list of matching profiles
-
getSearchResult
public List<org.imixs.workflow.ItemCollection> getSearchResult()
-
getReferences
public List<org.imixs.workflow.ItemCollection> getReferences()
This method returns a list of all ItemCollections referred by the current workItem (txtWorkitemRef).- Returns:
- - list of ItemCollection
-
getReferences
public List<org.imixs.workflow.ItemCollection> getReferences(String filter)
This method returns a list of ItemCollections referred by the current workItem ($WorkitemRef).The filter will be applied to the result list. So each WorkItem will be tested if it matches the filter expression.
The resultset is sorted by $created
- Returns:
- - list of ItemCollection with matches the current filter
-
getExternalReferences
public List<org.imixs.workflow.ItemCollection> getExternalReferences()
Returns a list of all workItems holding a reference to the current workItem.- Returns:
- Throws:
NamingException
-
getExternalReferences
public List<org.imixs.workflow.ItemCollection> getExternalReferences(String filter)
returns a list of all workItems holding a reference to the current workItem. If the filter is set the processID will be tested for the filter regex- Parameters:
filter-- Returns:
- Throws:
NamingException
-
getWorkitem
public org.imixs.workflow.ItemCollection getWorkitem(String id)
Helper method to load a full workitem from the frontend- Parameters:
id-- Returns:
-
-