Class FormController

  • All Implemented Interfaces:
    Serializable

    @Named
    @ConversationScoped
    public class FormController
    extends Object
    implements Serializable
    The FormController provides information about the Form, FormSections and FormParts defined by a Workitem. A form definition must be provided by the workitem property 'txtWorkflowEditorid' marked with the '#' character and separated with charater '|'. e.g.: form_tab#basic_project|sub_timesheet[owner,manager]
    Author:
    rsoika
    See Also:
    Serialized Form
    • Field Detail

      • processController

        @Inject
        protected org.imixs.marty.team.TeamController processController
      • userController

        @Inject
        protected org.imixs.marty.profile.UserController userController
      • resourceBundleHandler

        @Inject
        protected org.imixs.workflow.faces.util.ResourceBundleHandler resourceBundleHandler
    • Constructor Detail

      • FormController

        public FormController()
    • Method Detail

      • getFormDefinition

        public FormDefinition getFormDefinition()
        Retuns the FormDefinition for the current workitem
        Returns:
      • setFormDefinition

        public void setFormDefinition​(FormDefinition formDefinition)
      • onWorkflowEvent

        public void onWorkflowEvent​(@Observes
                                    org.imixs.workflow.faces.data.WorkflowEvent workflowEvent)
                             throws org.imixs.workflow.exceptions.AccessDeniedException
        WorkflowEvent listener to update the current FormDefinition.
        Parameters:
        workflowEvent -
        Throws:
        org.imixs.workflow.exceptions.AccessDeniedException
      • computeFormDefinition

        public FormDefinition computeFormDefinition​(org.imixs.workflow.ItemCollection aworkitem)
        Computes an new FormDefinition based on a given workitem. array list with EditorSection Objects defined by a given workitem. Each EditorSection object contains the url and the name of one section. EditorSections must be provided by the workitem property 'txtWorkflowEditorid' marked with the '#' character and separated with charater '|'. e.g.: form_tab#basic_project|sub_timesheet[owner,manager] This example provides the editor sections 'basic_project' and 'sub_timesheet'. The optional marker after the second section in [] defines the user membership to access this action. In this example the second section is only visible if the current user is member of the project owner or manager list. The following example illustrates how to iterate over the section array from a JSF fragment: .... The array of EditorSections also contains information about the name for a section. This name is read from the resouce bundle 'bundle.forms'. The '/' character will be replaced with '_'. So for example the section url myforms/sub_timesheet will result in resoure bundle lookup for the name 'myforms_sub_timersheet'
        Returns: