Add a table to jsf page

I have a jsf page that allows me to add a quiz that has many parameters. A quizz have a list of questions and when i want to put on generate question a list of questions will be displayed below the form on a jtable.

<h2>Veuillez saisir la question</h2>
<h:form id="myform">
     <h:panelGrid columns="2">
            <p:outputLabel value="Nom Test" />
            <p:inputText placeholder="title" value="#{testBean.nomTest}" />
            <p:outputLabel value="Type Preparation" />

            <h:selectOneMenu value="#{testBean.typePreparation}" 
                <f:selectItem itemLabel="Preparation Automatique" 
itemValue="Preparation Automatique" id="auto"/>
                <f:selectItem itemLabel="Preparation Manuelle" 
itemValue="Preparation Manuelle" id="man"/>                     

            <p:outputLabel value="Duree" />             
                <h:selectOneMenu value="#{testBean.duree}">
                <f:selectItem itemLabel="2 Minutes" itemValue="2 Minutes"/>
                <f:selectItem itemLabel="3 Minutes" itemValue="3 Minutes"/>
                <f:selectItem itemLabel="4 Minutes" itemValue="4 Minutes"/>                 

            <p:outputLabel value="Easy" />
            <p:inputText disabled="true" placeholder="nbr" value="#
{testBean.nbrQuestionFacile}" id="easy" />
            <p:outputLabel value="Medium" />
            <p:inputText disabled="true" placeholder="title" value="#
{testBean.nbrQuestionMedium}" id="med"  />
            <p:outputLabel  value="Hard" />
            <p:inputText disabled="true" placeholder="title" value="#
{testBean.nbrQuestionHard}" id="diff" />

    <p:commandButton type="submit" value="Create"
            action="#{testBean.doCreateTest()}"  /> <br></br>



and this the code of the method which display question : @Override public List prepareManuallyTest(){ String jpql = "SELECT q FROM Question q"; Query query = entityManager.createQuery(jpql); return query.getResultList(); } The manage Bean:

public class ManageTestBean {
ITestServiceLocal testService;
String nomTest;
String duree;
String typePreparation;
int nbrQuestionFacile;
int nbrQuestionMedium;
int nbrQuestionHard;
List<Question> questions;
Test t = new Test();
private Boolean formVisibility = false;

public List<Question> doGenerateQuestion(){     
    return questions;
public void doCreateTest(){


public ITestServiceLocal getTestService() {
    return testService;

public void setTestService(ITestServiceLocal testService) {
    this.testService = testService;

public String getNomTest() {
    return nomTest;

public void setNomTest(String nomTest) {
    this.nomTest = nomTest;

public String getDuree() {
    return duree;

public void setDuree(String duree) {
    this.duree = duree;

public String getTypePreparation() {
    return typePreparation;

public void setTypePreparation(String typePreparation) {
    this.typePreparation = typePreparation;

public int getNbrQuestionFacile() {
    return nbrQuestionFacile;

public void setNbrQuestionFacile(int nbrQuestionFacile) {
    this.nbrQuestionFacile = nbrQuestionFacile;

public int getNbrQuestionMedium() {
    return nbrQuestionMedium;

public void setNbrQuestionMedium(int nbrQuestionMedium) {
    this.nbrQuestionMedium = nbrQuestionMedium;

public int getNbrQuestionHard() {
    return nbrQuestionHard;

public void setNbrQuestionHard(int nbrQuestionHard) {
    this.nbrQuestionHard = nbrQuestionHard;

public Collection<Question> getQuestions() {
    return questions;

public void setQuestions(List<Question> questions) {
    this.questions = questions;

public Test getT() {
    return t;

public void setT(Test t) {
    this.t = t;

public Boolean getFormVisibility() {
    return formVisibility;

public void setFormVisibility(Boolean formVisibility) {
    this.formVisibility = formVisibility;

[The form][1]