Class ChildItemController

  • All Implemented Interfaces:
    Serializable

    @Named
    @ConversationScoped
    public class ChildItemController
    extends Object
    implements Serializable
    The CDI ChildItemController provides methods to display and edit sub items in a sub-form. The controller provides methods to add or remove a childItem. Each childItem is represented internally as a HashMap. To the front-end the ChildItemController provides a list of ItemCollections This CDI Controller can be used to provide different sub-views. The property '_ChildItems' of the current WorkItem hold the items.
    Version:
    1.0
    Author:
    rsoika
    See Also:
    Serialized Form
    • Field Detail

      • childItems

        protected List<org.imixs.workflow.ItemCollection> childItems
    • Constructor Detail

      • ChildItemController

        public ChildItemController()
    • Method Detail

      • setChildItems

        public void setChildItems​(List<org.imixs.workflow.ItemCollection> childItems)
      • getChildItems

        public List<org.imixs.workflow.ItemCollection> getChildItems()
        This methd returns a ItemCollections for each orderItem stored in the property txtOrderItems. Example: #{childController.childItems}
        Returns:
      • onWorkflowEvent

        public void onWorkflowEvent​(@Observes
                                    org.imixs.workflow.faces.data.WorkflowEvent workflowEvent)
                             throws org.imixs.workflow.exceptions.AccessDeniedException
        WorkflowEvent listener to convert embeded HashMaps into ItemCollections and reconvert them before processing
        Parameters:
        workflowEvent -
        Throws:
        org.imixs.workflow.exceptions.AccessDeniedException
      • add

        public void add()
        Adds a new order item
      • remove

        public void remove​(int pos)
      • convertDouble

        public double convertDouble​(String aValue)
      • implodeChildList

        protected void implodeChildList​(org.imixs.workflow.ItemCollection workitem)
        Convert the List of ItemCollections back into a List of Map elements
        Parameters:
        workitem -
      • explodeChildList

        protected void explodeChildList​(org.imixs.workflow.ItemCollection workitem)
        converts the Map List of a workitem into a List of ItemCollectons