Class StepDisplayTree
- java.lang.Object
-
- fr.paris.lutece.plugins.forms.web.StepDisplayTree
-
public class StepDisplayTree extends java.lang.ObjectManagement class for the display tree of a Step
-
-
Constructor Summary
Constructors Constructor Description StepDisplayTree(int nIdStep)ConstructorStepDisplayTree(int nIdStep, FormResponse formResponse)ConstructorStepDisplayTree(int nIdStep, FormResponse formResponse, java.util.List<java.lang.Integer> listQuestionId)ConstructorStepDisplayTree(int nIdStep, java.util.List<Question> listQuestion, FormResponse formResponse)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddModel(java.util.Map<java.lang.String,java.lang.Object> model)Adds the specified model in the model of this instancejava.lang.StringgetCompositeHtml(javax.servlet.http.HttpServletRequest request, java.util.List<FormQuestionResponse> listFormQuestionResponse, java.util.Locale locale, DisplayType displayType)Build and return the html template of the treejava.util.List<ICompositeDisplay>getCompositeList()Build and return all the composite display of the tree as a flat Listjava.util.List<Control>getListDisplayControls()java.util.List<Question>getQuestions()Gives all the questionsjava.util.Map<java.lang.Integer,java.util.List<fr.paris.lutece.plugins.genericattributes.business.Response>>getResponses()StepgetStep()voidinitStepTree(int nIdStep)Initialize the composite treevoiditerate(int nIdFormDisplay)Iterates the specified form displayvoidremoveIteration(javax.servlet.http.HttpServletRequest request, int nIdGroupParent, int nIndexIterationToRemove)Remove the specified iteration of groupvoidsetStep(Step 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 identifierformResponse- the form response containing the responses
-
StepDisplayTree
public StepDisplayTree(int nIdStep, FormResponse formResponse, java.util.List<java.lang.Integer> listQuestionId)Constructor- Parameters:
nIdStep- the step identifierformResponse- the form response containing the responseslistQuestionId- questions to display
-
StepDisplayTree
public StepDisplayTree(int nIdStep, java.util.List<Question> listQuestion, FormResponse formResponse)Constructor- Parameters:
nIdStep- the step identifierformResponse- the form response containing the responseslistQuestion- 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 requestnIdGroupParent- the id of the parent groupnIndexIterationToRemove- the index of the iteration to remove in group
-
getCompositeHtml
public java.lang.String getCompositeHtml(javax.servlet.http.HttpServletRequest request, java.util.List<FormQuestionResponse> listFormQuestionResponse, java.util.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
public java.util.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 java.util.Map<java.lang.Integer,java.util.List<fr.paris.lutece.plugins.genericattributes.business.Response>> getResponses()
- Returns:
- mapStepResponses The map containing question responses and potential errors
-
getListDisplayControls
public java.util.List<Control> getListDisplayControls()
- Returns:
- the list of display controls for this display tree
-
getQuestions
public java.util.List<Question> getQuestions()
Gives all the questions- Returns:
- the questions
-
addModel
public void addModel(java.util.Map<java.lang.String,java.lang.Object> model)
Adds the specified model in the model of this instance- Parameters:
model- the model to add
-
-