Package org.imixs.workflow.office.forms
Class CustomFormController
java.lang.Object
org.imixs.workflow.office.forms.CustomFormController
- All Implemented Interfaces:
Serializable
The CustomFormController is used by the workitem form to compute a set of
fields based on a data object provided by the model.
The form definition is automatically updated in a workitem field
'txtWorkflowEditorCustomForm' by the
CustomFormService EJB.- Author:
- rsoika
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcomputeFieldDefinition(org.imixs.workflow.ItemCollection workitem) The method reads the custom form definition from the item 'txtWorkflowEditorCustomForm' and computes an new custom Field Definition based on a given workitem.static StringgetInnerXMLContent(Element element) Helper method to extract the content of a xml tag including child tagsvoidinit()Initializes the ModelMangervoidonWorkflowEvent(org.imixs.workflow.faces.data.WorkflowEvent workflowEvent) WorkflowEvent listener to update the current FormDefinition.voidsetReadOnly(boolean readOnly) This method overwrite the 'readOnly' status flag for all sections.updateCustomFieldDefinition(org.imixs.workflow.ItemCollection workitem) This method updates the custom Field Definition based on a given workitem.
-
Field Details
-
ITEM_CUSTOM_FORM
- See Also:
-
-
Constructor Details
-
CustomFormController
public CustomFormController()
-
-
Method Details
-
init
@PostConstruct public void init()Initializes the ModelManger -
getSubforms
-
getSections
-
onWorkflowEvent
public void onWorkflowEvent(@Observes org.imixs.workflow.faces.data.WorkflowEvent workflowEvent) throws org.imixs.workflow.exceptions.ModelException WorkflowEvent listener to update the current FormDefinition.- Parameters:
workflowEvent-- Throws:
org.imixs.workflow.exceptions.AccessDeniedExceptionorg.imixs.workflow.exceptions.ModelException
-
computeFieldDefinition
public void computeFieldDefinition(org.imixs.workflow.ItemCollection workitem) throws org.imixs.workflow.exceptions.ModelException The method reads the custom form definition from the item 'txtWorkflowEditorCustomForm' and computes an new custom Field Definition based on a given workitem. The method first looks if the model contains a custom definition. If not the method checks the workitem field txtWorkflowEditorCustomForm which holds the last parsed custom form definition- Throws:
org.imixs.workflow.exceptions.ModelException
-
setReadOnly
public void setReadOnly(boolean readOnly) This method overwrite the 'readOnly' status flag for all sections. Note: sections can be embedded in optional subForms.- Parameters:
readOnly-
-
getInnerXMLContent
Helper method to extract the content of a xml tag including child tags -
updateCustomFieldDefinition
public String updateCustomFieldDefinition(org.imixs.workflow.ItemCollection workitem) throws org.imixs.workflow.exceptions.ModelException This method updates the custom Field Definition based on a given workitem. The method first looks if the task associated with the workitem contains a bpmn:DataObject containing a custom definition. The result is stored into the itemtxtWorkflowEditorCustomForm.In case the model does not provide a custom Field Definition but the workitem has stored one the method returns the existing one and did not update the item
txtWorkflowEditorCustomForm.- Returns:
- Throws:
org.imixs.workflow.exceptions.ModelException
-