Class CompositeQuestionDisplay

  • All Implemented Interfaces:
    ICompositeDisplay

    public class CompositeQuestionDisplay
    extends java.lang.Object
    implements ICompositeDisplay
    Implementation of ICompositeDisplay for Question
    • Constructor Detail

      • CompositeQuestionDisplay

        public CompositeQuestionDisplay​(FormDisplay formDisplay,
                                        FormResponse formResponse,
                                        int nIterationNumber)
        Constructor
        Parameters:
        formDisplay - the form display
        formResponse - the form response
        nIterationNumber - the iteration number
    • Method Detail

      • getCompositeHtml

        public java.lang.String getCompositeHtml​(javax.servlet.http.HttpServletRequest request,
                                                 java.util.List<FormQuestionResponse> listFormQuestionResponse,
                                                 java.util.Locale locale,
                                                 DisplayType displayType)
        Builds the HTML of the composite
        Specified by:
        getCompositeHtml in interface ICompositeDisplay
        Parameters:
        request - the request
        listFormQuestionResponse - the list of form question responses
        locale - The locale
        displayType - The display type
        Returns:
        the HTML
      • iterate

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

        public void removeIteration​(javax.servlet.http.HttpServletRequest request,
                                    int nIdGroupParent,
                                    int nIndexIterationToRemove,
                                    FormResponse formResponse)
        Remove the specified iteration of group
        Specified by:
        removeIteration in interface ICompositeDisplay
        Parameters:
        request - the request
        nIdGroupParent - the id of the group
        nIndexIterationToRemove - the index of the iteration to remove in group
        formResponse - the form responses
      • getTitle

        public java.lang.String getTitle()
        Specified by:
        getTitle in interface ICompositeDisplay
        Returns:
        the title of the compositeDisplay
      • getType

        public java.lang.String getType()
        Specified by:
        getType in interface ICompositeDisplay
        Returns:
        the type of the compositeDisplay
      • getIcon

        public java.lang.String getIcon()
        Specified by:
        getIcon in interface ICompositeDisplay
        Returns:
        the icon name
      • addQuestions

        public void addQuestions​(java.util.List<Question> listQuestion)
        Add the questions into the specified list
        Specified by:
        addQuestions in interface ICompositeDisplay
        Parameters:
        listQuestion - the list of question to complete
      • addModel

        public void addModel​(java.util.Map<java.lang.String,​java.lang.Object> model)
        Adds the specified model in the model of this instance
        Specified by:
        addModel in interface ICompositeDisplay
        Parameters:
        model - the model to add