}
private void createComponents()
{
final RequiredTextField textFieldValue = new RequiredTextField(
"textFieldValue", new PropertyModel(this, "description"));
final RequiredTextField txtReponseQuestion1 = new RequiredTextField(
"reponseQuestion1", new PropertyModel(this, "reponseQuestion1"));
final RequiredTextField txtReponseQuestion2 = new RequiredTextField(
"reponseQuestion2", new PropertyModel(this, "reponseQuestion2"));
if (this.choix.isAfficherAvis1())
{
this.add(new Label("avis1", new PropertyModel(choix, "avis1")));
}
else
{
textFieldValue.setVisible(false);
this.add(new Label("avis1", "Aucun"));
}
if (this.choix.isTextField())
{
this.add(new Label("textFieldName", new PropertyModel(choix,
"textFieldName")));
textFieldValue.setVisible(true);
}
else
{
textFieldValue.setVisible(false);
this.add(new Label("textFieldName", ""));
}
this.add(textFieldValue);
if (this.choix.isAfficherQuestion1())
{
this.add(new Label("question1", new PropertyModel(choix,
"question1")));
txtReponseQuestion1.setVisible(true);
}
else
{
txtReponseQuestion1.setVisible(false);
this.add(new Label("question1", ""));
}
this.add(txtReponseQuestion1);
if (this.choix.isAfficherQuestion2())
{
this.add(new Label("question2", new PropertyModel(choix,
"question2")));
txtReponseQuestion2.setVisible(true);
}
else
{
txtReponseQuestion2.setVisible(false);
this.add(new Label("question2", ""));
}
this.add(txtReponseQuestion2);