Class StepDisplayTree
java.lang.Object
fr.paris.lutece.plugins.forms.web.StepDisplayTree
- All Implemented Interfaces:
Serializable
Management class for the display tree of a Step
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStepDisplayTree(int nIdStep) ConstructorStepDisplayTree(int nIdStep, FormResponse formResponse) ConstructorStepDisplayTree(int nIdStep, FormResponse formResponse, List<Integer> listQuestionId) ConstructorStepDisplayTree(int nIdStep, List<Question> listQuestion, FormResponse formResponse) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the specified model in the model of this instancegetCompositeHtml(jakarta.servlet.http.HttpServletRequest request, List<FormQuestionResponse> listFormQuestionResponse, Locale locale, DisplayType displayType) Build and return the html template of the treeBuild and return all the composite display of the tree as a flat ListGives all the questionsgetStep()voidinitStepTree(int nIdStep) Initialize the composite treevoiditerate(int nIdFormDisplay) Iterates the specified form displayvoidremoveIteration(jakarta.servlet.http.HttpServletRequest request, int nIdGroupParent, int nIndexIterationToRemove) Remove the specified iteration of groupvoid
-
Constructor Details
-
StepDisplayTree
public StepDisplayTree(int nIdStep) Constructor- Parameters:
nIdStep- the step identifier
-
StepDisplayTree
Constructor- Parameters:
nIdStep- the step identifierformResponse- the form response containing the responses
-
StepDisplayTree
Constructor- Parameters:
nIdStep- the step identifierformResponse- the form response containing the responseslistQuestionId- questions to display
-
StepDisplayTree
Constructor- Parameters:
nIdStep- the step identifierformResponse- the form response containing the responseslistQuestion- questions to display
-
-
Method Details
-
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(jakarta.servlet.http.HttpServletRequest request, int nIdGroupParent, int nIndexIterationToRemove) Remove the specified iteration of group- Parameters:
request- the requestnIdGroupParent- the id of the parent groupnIndexIterationToRemove- the index of the iteration to remove in group
-
getCompositeHtml
public String getCompositeHtml(jakarta.servlet.http.HttpServletRequest request, List<FormQuestionResponse> listFormQuestionResponse, Locale locale, DisplayType displayType) Build and return the html template of the tree- Parameters:
request- the requestlistFormQuestionResponse- the list of form question responseslocale- the localedisplayType- The display type- Returns:
- the html template of the tree as a String
-
getCompositeList
Build and return all the composite display of the tree as a flat List- Returns:
- the list of composite display
-
getStep
- Returns:
- the _step
-
setStep
- 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
- Returns:
- the list of display controls for this display tree
-
getQuestions
Gives all the questions- Returns:
- the questions
-
addModel
Adds the specified model in the model of this instance- Parameters:
model- the model to add
-