Class CompositeQuestionDisplay
java.lang.Object
fr.paris.lutece.plugins.forms.web.CompositeQuestionDisplay
- All Implemented Interfaces:
ICompositeDisplay
Implementation of ICompositeDisplay for Question
-
Constructor Summary
ConstructorsConstructorDescriptionCompositeQuestionDisplay(FormDisplay formDisplay, FormResponse formResponse, int nIterationNumber) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the specified model in the model of this instancevoidaddQuestions(List<Question> listQuestion) Add the questions into the specified listfilterFromListQuestion(List<Question> listQuestion) filter composiste listChildren with the listQuestion using iteration numbergetCompositeHtml(javax.servlet.http.HttpServletRequest request, List<FormQuestionResponse> listFormQuestionResponse, Locale locale, DisplayType displayType) Builds the HTML of the compositeReturn the full list of children ICompositeDisplay of an initialized CompositeDisplayreturn the FormDisplaygetIcon()Return the IterationNumber of the questiongetTitle()getType()booleanis the composite display visible.voiditerate(int nIdFormDisplay) Iterates the specified form displayvoidremoveIteration(javax.servlet.http.HttpServletRequest request, int nIdGroupParent, int nIndexIterationToRemove, FormResponse formResponse) Remove the specified iteration of group
-
Constructor Details
-
CompositeQuestionDisplay
public CompositeQuestionDisplay(FormDisplay formDisplay, FormResponse formResponse, int nIterationNumber) Constructor- Parameters:
formDisplay- the form displayformResponse- the form responsenIterationNumber- the iteration number
-
-
Method Details
-
getCompositeHtml
public String getCompositeHtml(javax.servlet.http.HttpServletRequest request, List<FormQuestionResponse> listFormQuestionResponse, Locale locale, DisplayType displayType) Builds the HTML of the composite- Specified by:
getCompositeHtmlin interfaceICompositeDisplay- Parameters:
request- the requestlistFormQuestionResponse- the list of form question responseslocale- The localedisplayType- The display type- Returns:
- the HTML
-
iterate
public void iterate(int nIdFormDisplay) Iterates the specified form display- Specified by:
iteratein interfaceICompositeDisplay- 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:
removeIterationin interfaceICompositeDisplay- Parameters:
request- the requestnIdGroupParent- the id of the groupnIndexIterationToRemove- the index of the iteration to remove in groupformResponse- the form responses
-
getCompositeList
Description copied from interface:ICompositeDisplayReturn the full list of children ICompositeDisplay of an initialized CompositeDisplay- Specified by:
getCompositeListin interfaceICompositeDisplay- Returns:
- the children composite list
-
getTitle
- Specified by:
getTitlein interfaceICompositeDisplay- Returns:
- the title of the compositeDisplay
-
getType
- Specified by:
getTypein interfaceICompositeDisplay- Returns:
- the type of the compositeDisplay
-
getFormDisplay
Description copied from interface:ICompositeDisplayreturn the FormDisplay- Specified by:
getFormDisplayin interfaceICompositeDisplay- Returns:
- the FormDisplay
-
getIcon
- Specified by:
getIconin interfaceICompositeDisplay- Returns:
- the icon name
-
getAllDisplayControls
- Specified by:
getAllDisplayControlsin interfaceICompositeDisplay- Returns:
- all the Display Controls in the child
-
addQuestions
Add the questions into the specified list- Specified by:
addQuestionsin interfaceICompositeDisplay- Parameters:
listQuestion- the list of question to complete
-
addModel
Adds the specified model in the model of this instance- Specified by:
addModelin interfaceICompositeDisplay- Parameters:
model- the model to add
-
isVisible
public boolean isVisible()Description copied from interface:ICompositeDisplayis the composite display visible.- Specified by:
isVisiblein interfaceICompositeDisplay- Returns:
-
filter
- Specified by:
filterin interfaceICompositeDisplay
-
filterFromListQuestion
Description copied from interface:ICompositeDisplayfilter composiste listChildren with the listQuestion using iteration number- Specified by:
filterFromListQuestionin interfaceICompositeDisplay- Parameters:
listQuestion- The listQuestion- Returns:
- composite display
-
getIterationNumber
Description copied from interface:ICompositeDisplayReturn the IterationNumber of the question- Specified by:
getIterationNumberin interfaceICompositeDisplay- Returns:
- IterationNumber
-