Class StepDisplayTree


  • public class StepDisplayTree
    extends Object
    Management class for the display tree of a Step
    • Constructor Detail

      • StepDisplayTree

        public StepDisplayTree​(int nIdStep)
        Constructor
        Parameters:
        nIdStep - the step identifier
      • StepDisplayTree

        public StepDisplayTree​(int nIdStep,
                               FormResponse formResponse)
        Constructor
        Parameters:
        nIdStep - the step identifier
        formResponse - the form response containing the responses
      • StepDisplayTree

        public StepDisplayTree​(int nIdStep,
                               FormResponse formResponse,
                               List<Integer> listQuestionId)
        Constructor
        Parameters:
        nIdStep - the step identifier
        formResponse - the form response containing the responses
        listQuestionId - questions to display
    • Method Detail

      • initStepTree

        public void initStepTree​(int nIdStep)
        Initialize the composite tree
        Parameters:
        nIdStep - The step primary key
      • iterate

        public void iterate​(int nIdFormDisplay)
        Iterates the specified form display
        Parameters:
        nIdFormDisplay - the id of the form display to iterate
      • removeIteration

        public void removeIteration​(javax.servlet.http.HttpServletRequest request,
                                    int nIdGroupParent,
                                    int nIndexIterationToRemove)
        Remove the specified iteration of group
        Parameters:
        request - the request
        nIdGroupParent - the id of the parent group
        nIndexIterationToRemove - the index of the iteration to remove in group
      • getCompositeHtml

        public String getCompositeHtml​(javax.servlet.http.HttpServletRequest request,
                                       List<FormQuestionResponse> listFormQuestionResponse,
                                       Locale locale,
                                       DisplayType displayType)
        Build and return the html template of the tree
        Parameters:
        request - the request
        listFormQuestionResponse - the list of form question responses
        locale - the locale
        displayType - The display type
        Returns:
        the html template of the tree as a String
      • getCompositeList

        public List<ICompositeDisplay> getCompositeList()
        Build and return all the composite display of the tree as a flat List
        Returns:
        the list of composite display
      • getStep

        public Step getStep()
        Returns:
        the _step
      • setStep

        public void setStep​(Step step)
        Parameters:
        step - the step to set
      • getResponses

        public Map<Integer,​List<fr.paris.lutece.plugins.genericattributes.business.Response>> getResponses()
        Returns:
        mapStepResponses The map containing question responses and potential errors
      • getListDisplayControls

        public List<Control> getListDisplayControls()
        Returns:
        the list of display controls for this display tree
      • getQuestions

        public List<Question> getQuestions()
        Gives all the questions
        Returns:
        the questions
      • addModel

        public void addModel​(Map<String,​Object> model)
        Adds the specified model in the model of this instance
        Parameters:
        model - the model to add